Skip to content
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

rbd: Allow user to disable key rotation #2817

Merged

Conversation

black-dragon74
Copy link
Contributor

This patch allows user to disable automatic
key rotation by annotating StorageCluster
with keyrotation.csiaddons.openshift.io/enable=false

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 7, 2024
controllers/storagecluster/storageclasses.go Outdated Show resolved Hide resolved
controllers/storagecluster/storageclasses.go Outdated Show resolved Hide resolved
controllers/storagecluster/storageclasses.go Show resolved Hide resolved
controllers/util/util.go Outdated Show resolved Hide resolved
controllers/util/util.go Outdated Show resolved Hide resolved
Copy link
Member

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

I think we dont have code that updates the storageclass, can you please check/test what happens if we add/remove the annotation?

controllers/storagecluster/storageclasses.go Outdated Show resolved Hide resolved
@black-dragon74
Copy link
Contributor Author

I think we dont have code that updates the storageclass, can you please check/test what happens if we add/remove the annotation?

Right. I have updated the PR to recreate the storage class in cases where the existing StorageClass does not have the annotation present.

Copy link
Member

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

LGTM

controllers/storagecluster/storageclasses.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2024
@Madhu-1 Madhu-1 removed the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2024
@black-dragon74 black-dragon74 force-pushed the kr-disable-rbd branch 2 times, most recently from fd36a22 to 220f333 Compare November 14, 2024 09:49
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2024
@Madhu-1
Copy link
Member

Madhu-1 commented Nov 14, 2024

/assign @iamniting

controllers/storagecluster/storageclasses.go Outdated Show resolved Hide resolved
controllers/storagecluster/storageclasses.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2024
This patch allows user to disable automatic
key rotation by annotating StorageCluster
with `keyrotation.csiaddons.openshift.io/enable=false`

Signed-off-by: Niraj Yadav <[email protected]>
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2024
Copy link
Contributor

openshift-ci bot commented Nov 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: black-dragon74, iamniting, Madhu-1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2024
@iamniting
Copy link
Member

@black-dragon74 Have you tested it? If not pls add a hold on the PR and test it before it gets merged.

@black-dragon74
Copy link
Contributor Author

@black-dragon74 Have you tested it? If not pls add a hold on the PR and test it before it gets merged.

I tested an older version of this PR. The core implementation did not change. I am putting a hold, will cancel it once I test it out.

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 14, 2024
@iamniting
Copy link
Member

@black-dragon74 Have you tested it? If not pls add a hold on the PR and test it before it gets merged.

I tested an older version of this PR. The core implementation did not change. I am putting a hold, will cancel it once I test it out.

/hold

Thanks

@black-dragon74
Copy link
Contributor Author

Tested with the latest set of changes. Everything is working as expected.

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 14, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit a568b2a into red-hat-storage:main Nov 14, 2024
11 checks passed
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.

8 participants