Skip to content
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

Use metav1.SetMetadataAnnotation instead of secret.Annotations[] in ConfigSecret #706

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changelog for Cass Operator, new PRs should update the `main / unreleased` secti
## unreleased

* [FEATURE] [#651](https://github.com/k8ssandra/cass-operator/issues/651) Add tsreload task for DSE deployments and ability to check if sync operation is available on the mgmt-api side
* [BUGFIX] [#705](https://github.com/k8ssandra/cass-operator/issues/705) Ensure ConfigSecret has annotations map before trying to set a value

## v1.22.2

Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciliation/reconcile_configsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (rc *ReconciliationContext) checkDatacenterNameAnnotation(secret *corev1.Se
}

patch := client.MergeFrom(secret.DeepCopy())
secret.Annotations[api.DatacenterAnnotation] = rc.Datacenter.Name
metav1.SetMetaDataAnnotation(&secret.ObjectMeta, api.DatacenterAnnotation, rc.Datacenter.Name)
return rc.Client.Patch(rc.Ctx, secret, patch)
}

Expand Down
Loading