-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove random suffixes on creds-init volumes #3907
Conversation
Removed the random suffixes that used to appear on creds-init volumes. These didn't serve any purpose that couldn't be equally well-served with an incrementing integer. The benefit of doing it this way is that our unit tests become less brittle - those random suffixes were a source of considerable churn whenever other volumes were added or removed to test data because the random pool of suffixes was shared with those other volumes.
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.
/lgtm
cfg := config.FromContextOrDefaults(ctx) | ||
if cfg != nil && cfg.FeatureFlags != nil && cfg.FeatureFlags.DisableCredsInit { | ||
return nil, nil | ||
} | ||
name := names.SimpleNameGenerator.RestrictLengthWithRandomSuffix(credsInitHomeMountPrefix) | ||
name := fmt.Sprintf("%s-%d", credsInitHomeMountPrefix, idx) |
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.
Given that credsInitHomeMountPrefix
is a fixed, non configurable string, this looks good.
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.
Nice! Thank you :)
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli 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 |
Changes
Removed the random suffixes that used to appear on creds-init volumes. These
didn't serve any purpose that couldn't be equally well-served with an
incrementing integer.
The benefit of doing it this way is that our unit tests become less brittle -
those random suffixes were a source of considerable churn whenever other
volumes were added or removed to test data because the random pool of suffixes
was shared with those other volumes.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes