Update rook-ceph-operator pod to have required-scc annoations - #1291
Conversation
|
Please update the bug nimber in tittle, Example: see this pr title #1288 |
| $yq '.spec.install.spec.deployments[0].spec.template.spec.priorityClassName = "system-cluster-critical"' --inplace "$CSV_FILE_NAME" | ||
|
|
||
| # Pin the operator pod to the rook-ceph SCC on OpenShift | ||
| $yq '.spec.install.spec.deployments[0].spec.template.metadata.annotations."openshift.io/required-scc" = "rook-ceph"' --inplace "$CSV_FILE_NAME" |
There was a problem hiding this comment.
What if there will be other annotations added to the operator pod later? will this still work as expected?
There was a problem hiding this comment.
Yes. This uses key-level yq assignment, so additional operator pod annotations from the source manifest or future csv-gen.sh patches will coexist.
similar to how we are already patch priorityClassName
There was a problem hiding this comment.
Please test this scenario once, where the annotations are already there in the operator yaml, hopefully it would work
There was a problem hiding this comment.
- added an annotation to
operator-openshift.yaml(test.example/keep-me: "true") - installed bundle via operator-sdk
- deployment had both annotations
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to adding a single OpenShift-specific annotation in both generation and generated CSV output, with no apparent functional regressions.
Pull request overview
This PR updates the generated OLM ClusterServiceVersion (CSV) content for rook-ceph-operator to include the OpenShift openshift.io/required-scc: rook-ceph pod annotation, ensuring the operator deployment requests the intended SCC when installed via OLM on OpenShift.
Changes:
- Extend
build/csv/csv-gen.shto inject theopenshift.io/required-scc: rook-cephannotation into the operator deployment template metadata during CSV generation. - Update the checked-in CSV manifest to include the same annotation on the operator pod template.
File summaries
| File | Description |
|---|---|
| build/csv/csv-gen.sh | Adds yq post-processing to set the operator pod template annotation openshift.io/required-scc: rook-ceph during bundle/CSV generation. |
| build/csv/ceph/rook-ceph-operator.clusterserviceversion.yaml | Updates the generated CSV content to include the openshift.io/required-scc: rook-ceph annotation under the operator deployment’s pod template metadata. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/retest |
There was a problem hiding this comment.
Have we tested this?
And, cli errors are not coming your changes it's little flaky.
Edit:
You need to fix the commitlint CI error https://github.com/red-hat-storage/rook/actions/runs/34201007241/job/101979524197?pr=1291.
d7d5814 to
f5971ff
Compare
@subhamkrai yes tested this on a openshift-cluster. fixed the commit text as well |
|
/cherry-pick release-5.0 |
|
@ezio-auditore: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
f5971ff to
36f06ed
Compare
Signed-off-by: Kaustav Majumder <kaustav.majumder@ibm.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ezio-auditore, parth-gr, subhamkrai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@ezio-auditore: new pull request created: #1295 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Resolves https://redhat.atlassian.net/browse/DFBUGS-10771
Update the rook-ceph-operator with openshift.io/required-scc: rook-ceph annotation
Checklist:
Documentationfolder)._test.gofiles under thecmdandpkgfolders).tests/integrationfolder).