-
Notifications
You must be signed in to change notification settings - Fork 66
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
Safely set annotation on datacenter #254
Conversation
While setting any annotation, the user must initialize the Annotations map if it isn't already. The helper `metav1.SetMetadataAnnotation` takes care of this.
Hi, thank you for the PR. Have you run into a situation where this actually occurs? |
Yes, I have. The issue only occurs when using a separate kubernetes secret for the cassandra config overrides. The cass-operator gets stuck into a crash loop with this error at the end of the logs:
A workaround for this is to set any annotation on the datacenter object. |
Apparently it's a bit different configuration than the one used in https://github.com/k8ssandra/cass-operator/blob/master/tests/config_secret/config_secret_suite_test.go ? Do you think it would be possible to modify that integration test to also trigger this error? To ensure it's not unintentionally reintroduced (by botched mergeconflict for example). |
What this PR does:
While setting any annotation, the user must initialize the Annotations
map if it isn't already. The helper
metav1.SetMetadataAnnotation
takescare of this.
Which issue(s) this PR fixes:
N/A
The
updateConfigHashAnnotation
function panics when it encounters a datacenter without any annotations. This PR should fix that.Checklist