-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add hashed configs to pod annotations #469
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #469 +/- ##
==========================================
+ Coverage 85.91% 86.03% +0.11%
==========================================
Files 12 12
Lines 1633 1647 +14
==========================================
+ Hits 1403 1417 +14
Misses 145 145
Partials 85 85 ☔ View full report in Codecov by Sentry. |
Signed-off-by: hoyhbx <[email protected]>
@hoyhbx Could you please add an end-to-end test to validate this? |
For the functions that are local name is starting with small letter |
Change log description
Purpose of the change
Fixes #454
What the code does
Add hashed zookeeper configuration as the pod annotation in the statefulSet.
The makeZkPodAnnotations function computes the hash for the zookeeper config string and calls mergeAnnotations to merge with the annotations from the CR.
There are several possible improvements regarding the patch:
mergeAnnotations
function encodes the same logic as themergeLabels
function, we could reduce these two into a generalmergeMap
function to reduce the code redundency.env.sh
could reflect to the zookeeper cluster without a restart. If that also requires a restart, then we can add the hash of result ofmakeZkEnvConfigString
to the annotation map too.How to verify it
Similar to the steps mentioned in #454