-
Notifications
You must be signed in to change notification settings - Fork 14
Fix LauncherConfig CRD to accept metadata in podTemplate #434
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
template.Metadata.Labels/Annotationsare assigned directly into the Pod's ObjectMeta, but this function later mutatespod.Labelsandpod.Annotations. Because maps are reference types, this will also mutate the LauncherConfig's cachedspec.podTemplate.metadatamaps (from the informer/lister) when users supply labels/annotations, which can cause surprising controller behavior and potential races. Clone the maps (or deep-copy the template metadata) before mutating the Pod's labels/annotations so the LauncherConfig object remains immutable in memory.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.
Fixed.