-
Notifications
You must be signed in to change notification settings - Fork 38
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
Move to VerifySecret when checking the ctlplane secret, and other code consolidation #437
Move to VerifySecret when checking the ctlplane secret, and other code consolidation #437
Conversation
We have a number of places where we are using 5 seconds durations, 10 seconds duration, and requeue after 10 seconds. These are all "magic numbers" spread all over the operator code. This patch creates 2 constants and 1 variable (because golang doesn't allow it to be defined as a constant) for these so that they can be used throughout the code having defined the "magic numbers" in a single location.
Instead of recording a hash of the entire ctlplane secret, a new function is introduced that uses lib-common's VerifySecret() to verify and return the hash of only the cinder service's portion of the secret. This avoids restarting all cinder services when an unrelated portion of the ctlplane secret changes. This change follows a similar manila PR [1]. [1] openstack-k8s-operators/manila-operator#324 Jira: OSPRH-8192
Replace multiple calls to collect hashes of the Transport URL secret and other service configuration secrets with a new verifyConfigSecrets() function that can be shared by all cinder services. This also eliminates the need for each service to provide its own getSecret function. This change continues to mimic code in manila's PR [1]. [1] openstack-k8s-operators/manila-operator#324
/retest |
/test cinder-operator-build-deploy-kuttl |
/retest |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ASBishop, fmount 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 |
5d48463
into
openstack-k8s-operators:main
This PR consists of 3 commits:
See also openstack-k8s-operators/manila-operator#324