Skip to content

patch pod annotations to force volume sync#209

Merged
m-terra merged 1 commit into
mainfrom
trigger-secret-reload
May 27, 2026
Merged

patch pod annotations to force volume sync#209
m-terra merged 1 commit into
mainfrom
trigger-secret-reload

Conversation

@m-terra
Copy link
Copy Markdown
Collaborator

@m-terra m-terra commented May 27, 2026

No description provided.

@m-terra m-terra requested a review from xosk31 May 27, 2026 07:53
@m-terra m-terra merged commit 3fb582a into main May 27, 2026
4 checks passed
}
pod.Annotations["haproxy.operator/checksum"] = checksum

err = r.Patch(ctx, pod, client.MergeFrom(original))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-terra for better efficiency, you can avoid calculating the patch on each iteration:

patch := fmt.Appendf(nil, `{"metadata":{"annotations":{"haproxy.operator/checksum": "%s"}}}`, checksum) // place this outside of the loop
err = r.Patch(ctx, pod, client.RawPatch(types.MergePatchType, patch))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants