Skip to content

set ceph daemons key rotation policy #3376

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

iamniting
Copy link
Member

Signed-off-by: Nitin Goyal [email protected]

Copy link
Contributor

openshift-ci bot commented Jul 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iamniting

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 Jul 17, 2025
@@ -53,6 +54,8 @@ const (
const (
poolTypeData = "data"
poolTypeMetadata = "metadata"

keyRotationCounterEnvVarName = "KEY_ROTATION_COUNTER"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a better name like: CEPH_USER_CURR_GEN

Copy link
Member Author

Choose a reason for hiding this comment

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

Lets hear from others, I believe we can come up with something better.

Comment on lines 578 to 586
KeyGenerationValue, ok := os.LookupEnv(keyRotationCounterEnvVarName)
if !ok {
panic("KEY_ROTATION_COUNTER env variable is not set")
}

KeyGeneration, err := strconv.Atoi(KeyGenerationValue)
if err != nil {
panic("can not convert KEY_ROTATION_COUNTER value to a integer")
}
Copy link
Member

Choose a reason for hiding this comment

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

We could have a util for this as this is going to be used in multiple places

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -26,6 +27,10 @@ import (
"k8s.io/apimachinery/pkg/types"
)

func init() {
os.Setenv(keyRotationCounterEnvVarName, "2")
Copy link
Member

Choose a reason for hiding this comment

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

From what I remember, there are various other env variables we are setting for tests. Any reason to set this differently from the others?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Nitin Goyal <[email protected]>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants