Skip to content

Add configured labels to worker pods#216

Merged
mnonnenmacher merged 2 commits intomainfrom
worker-labels
Apr 1, 2026
Merged

Add configured labels to worker pods#216
mnonnenmacher merged 2 commits intomainfrom
worker-labels

Conversation

@mnonnenmacher
Copy link
Copy Markdown
Contributor

See the commit messages for details.

Sprig's `merge` mutates its destination in place. Passing
`.Values.commonLabels` directly caused chart labels to be written back
into the shared values map, polluting it for all subsequent template
evaluations in the same render.

Fix this by using `deepCopy` so `merge` operates on a throwaway copy.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
Automatically add the lables configured in `Values.commonLabels` and
`Values.podLabels` to the worker pods created by the orchestrator.

This requires converting the label maps into comma-separated strings of
key-value pairs and passing them to the orchestrator via the worker
specific environment variables.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
@mnonnenmacher mnonnenmacher enabled auto-merge (rebase) April 1, 2026 16:31
@mnonnenmacher mnonnenmacher merged commit 7214d56 into main Apr 1, 2026
3 checks passed
@mnonnenmacher mnonnenmacher deleted the worker-labels branch April 1, 2026 16:34
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.

2 participants