Skip to content

Update rook-ceph-operator pod to have required-scc annoations - #1291

Merged
subhamkrai merged 1 commit into
red-hat-storage:masterfrom
ezio-auditore:odf-scc
Sep 10, 2026
Merged

subhamkrai merged 1 commit into
red-hat-storage:masterfrom
ezio-auditore:odf-scc

Conversation

@ezio-auditore

Copy link
Copy Markdown

Resolves https://redhat.atlassian.net/browse/DFBUGS-10771

Update the rook-ceph-operator with openshift.io/required-scc: rook-ceph annotation

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Reviewed AI guidelines, if AI assisted with the PR.
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
    • Overwriting Ceph's configurations should be marked as breaking changes.
  • Documentation has been updated, if necessary (under the Documentation folder).
  • Unit tests have been added, if necessary (_test.go files under the cmd and pkg folders).
  • Integration tests have been added, if necessary (in the tests/integration folder).

@parth-gr

parth-gr commented Sep 8, 2026

Copy link
Copy Markdown
Member

Please update the bug nimber in tittle,

Example: see this pr title #1288

Comment thread build/csv/csv-gen.sh
Comment thread build/csv/csv-gen.sh
$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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if there will be other annotations added to the operator pod later? will this still work as expected?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@parth-gr parth-gr Sep 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test this scenario once, where the annotations are already there in the operator yaml, hopefully it would work

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parth-gr

  • added an annotation to operator-openshift.yaml (test.example/keep-me: "true")
  • installed bundle via operator-sdk
  • deployment had both annotations

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.sh to inject the openshift.io/required-scc: rook-ceph annotation 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.

@ezio-auditore

Copy link
Copy Markdown
Author

/retest

@subhamkrai subhamkrai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ezio-auditore

Copy link
Copy Markdown
Author

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.

@subhamkrai yes tested this on a openshift-cluster. fixed the commit text as well

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2026
@ezio-auditore

Copy link
Copy Markdown
Author

/cherry-pick release-5.0

@openshift-cherrypick-robot

Copy link
Copy Markdown

@ezio-auditore: once the present PR merges, I will cherry-pick it on top of release-5.0 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-5.0

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.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2026
Signed-off-by: Kaustav Majumder <kaustav.majumder@ibm.com>
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2026
@openshift-ci

openshift-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@subhamkrai
subhamkrai merged commit 89ce1ae into red-hat-storage:master Sep 10, 2026
56 of 57 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown

@ezio-auditore: new pull request created: #1295

Details

In response to this:

/cherry-pick release-5.0

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants