-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare to push v0.8.0 to the Operator Hub #287
Prepare to push v0.8.0 to the Operator Hub #287
Conversation
The operator-sdk will be installed if not found on $PATH nor ./bin directory, just like the other build tools. Because we handle its installation on the Makefile, it won't be needed to get installed by the tests Ansible playbook. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Added the 'Operator hub' section on `make help` output, and moved the 'opm' target to under 'Build Dependencies'. ``` $ make help [snip] Build Dependencies kustomize Download kustomize locally if necessary. controller-gen Download controller-gen locally if necessary. envtest Download envtest-setup locally if necessary. operator-sdk Download operator-sdk locally if necessary. opm Download opm locally if necessary. Operator Hub bundle Generate bundle manifests and metadata, then validate generated files. bundle-build Build the bundle image. bundle-push Push the bundle image. catalog-build Build a catalog image. catalog-push Push a catalog image. ``` Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Using the operator-sdk v1.30.0 which is the same version used on the operator hub CI. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Updated the config/manifest kustomize configuration to reflect the following: * The config/samples were split in ccruntime and enclave-cc on commit ee48a38, being config/samples/ccruntime/default the default configuration to amd64. * The config/release was created on commit 1e068ff. It kustomize a stable (release) image for config/default. Fixes confidential-containers#238 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Just like on Operator Hub, let's run the full operator framwork validation (i.e. include the optional checks). Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Full names and valid email are required to pass the operator hub CI. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
The operator-sdk validation was failing with the error: ``` ERRO[0000] Error: Value : (cc-operator.v0.0.1) csv.Spec.Icon elements should contain both data and mediatype ``` Desides adding the icon media type, this added the icon data in base64. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Fixed the error on operator hub CI: ``` An empty value found - 'metadata.annotations.categories' ``` Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Updated the operator hub bundle for the 0.8.0 release. First bumped VERSION in Makefile then the new bundle was generated with: ``` $ make bundle IMG=quay.io/confidential-containers/operator:v0.8.0 ``` Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
On Operator Hub we are configured for a new version to replace the previous, in this case the v0.8.0 should replace v0.5.0. First added the `replaces` property to bundle/manifests/cc-operator.clusterserviceversion.yaml then re-generated the manifests as: ``` make bundle IMG=quay.io/confidential-containers/operator:v0.8.0 ``` Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Fix error found on operator hub CI: ``` Value of 'metadata.annotations.containerImage' not found, please check. ``` Apparently the operator SDK cannot guess the operator image from the informations provided. Manifests regenerated with: ``` make bundle IMG=quay.io/confidential-containers/operator:v0.8.0 ``` Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Created the OPERATOR_HUB.md with instructions to publish a new version of the operator. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Hi @wainersm, Thanks for this PR. I looked through the code and didn't catch anything. Regarding the warnings, some thoughts:
|
Hi @portersrc thanks for the review and suggestions! Some comments below:
I set minKubeVersion as below:
Then I regenerated the operator and updated k8s-operatorhub/community-operators#3532 . However CI fail... it is not clear to me the failure though, whether I am passing the wrong version (e.g. "v1.24" instead of "1.24" or "1.24.0"
I will open an issue to track the fix for those other warnings but I won't be addressing them because it is too risky at this point. |
Supress the warning: ``` WARN[0000] Warning: Value : (cc-operator.v0.8.0) csv.Spec.minKubeVersion is not informed. It is recommended you provide this information. Otherwise, it would mean that your operator project can be distributed and installed in any cluster version available, which is not necessarily the case for all projects. ``` Kubernetes 1.24 is the version used on operator CI as well as the mininum recommended version in the quickstart guide of CoCo. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Set to "1.24.0" and now it passes the operator hub CI!
Opened the issues: |
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the disclaimer that I'm fair from operator SDK fluent, I have gone through all the commits and they seem to make sense and address the warnings mentioned. Thanks for the documentation too!
" I have gone through all the commits and they seem to make sense and address the warnings mentioned" <--- this makes you an expert! j/k Thanks once again @stevenhorsman ! |
/test |
It seems that the changes broke the operator:
I suspect it is this change: 570df87#diff-75dd57ab6a8429b6c9a269cff17b4227c474835c62479b76b6531536855a2210L12 |
/test-kata-qemu |
2 similar comments
/test-kata-qemu |
/test-kata-qemu |
The following message is an error on the debug_pod() function: ``` 16:31:31 DEBUG: Pod cc-operator-controller-manager-67f7dff85b-qfnm4 16:31:31 + kubectl describe pods/cc-operator-controller-manager-67f7dff85b-qfnm4 '-n confidential-containers-system' 16:31:31 Error from server (NotFound): namespaces " confidential-containers-system" not found ``` It's passing '-n confidential-containers-system' as an single argument to kubectl rather two (kubectl [...] '-n confidential-containers-system' vs kubectl [...] -n confidential-containers-system). Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
17787bd
to
02ed4c9
Compare
I found the problem. There are two issues on the CI scripts. /test-kata-qemu |
Now it print the debug pod correctly:
|
The operator image is built then published on a local registry; on config/manager/kustomization.yaml its name is changed to localhost:5000/cc-operator so that it is pulled from that registry on install time. It isn´t setting the tag of the image though, which means it uses whatever `newTag` value from the kustomization file. Everything works fine when `newTag` is `latest`, but when it is set to a release tag (e.g. v0.8.0) the installation will look for an image like localhost:5000/cc-operator:v0.8.0, whereas on local registry it was pushed as localhost:5000/cc-operator:latest. This change ensures that `newTag` is always set to `latest`, matching the image name and tag of the one pushed to the local registry. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This last commit I added on this PR should make the CI green. /test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @wainersm!
In order to publish our releases on the Operator Hub, the
bundle
directory should be re-generated. The last time we did it was for the release 0.5.0 using an older operator SDK. The operator hub relies on a new operator SDK (1.30) which requires fields not present at the time we last published, so I had to update some files on this repository.I re-generate the bundle and opened a pull request on k8s-operatorhub/community-operators#3532 . All CI jobs passed, but it would be nice to have a careful review on the files to ensure that everything is as expected.
There are some warnings generated by the operator SDK that I did not address:
Please advise on what values I should be using to silent the warnings completely.