-
Notifications
You must be signed in to change notification settings - Fork 185
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal <[email protected]>
[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 |
@@ -53,6 +54,8 @@ const ( | |||
const ( | |||
poolTypeData = "data" | |||
poolTypeMetadata = "metadata" | |||
|
|||
keyRotationCounterEnvVarName = "KEY_ROTATION_COUNTER" |
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.
Maybe a better name like: CEPH_USER_CURR_GEN
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.
Lets hear from others, I believe we can come up with something better.
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") | ||
} |
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.
We could have a util for this as this is going to be used in multiple places
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.
Done
@@ -26,6 +27,10 @@ import ( | |||
"k8s.io/apimachinery/pkg/types" | |||
) | |||
|
|||
func init() { | |||
os.Setenv(keyRotationCounterEnvVarName, "2") |
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.
From what I remember, there are various other env variables we are setting for tests. Any reason to set this differently from the others?
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.
Done
Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal <[email protected]>
Signed-off-by: Nitin Goyal [email protected]