Skip to content

feat: add podLabels to pod template#435

Merged
jmpalomares merged 4 commits into
mainfrom
feat/pod-labels
Jun 16, 2026
Merged

feat: add podLabels to pod template#435
jmpalomares merged 4 commits into
mainfrom
feat/pod-labels

Conversation

@jmpalomares

@jmpalomares jmpalomares commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Adds an optional podLabels value to the shared common pod template, merged into the pod template labels only — the (immutable) Deployment/Rollout selector is untouched, and managed/selector labels always win on collision (user labels can only add new keys).

Enables scheduling controls that key off pod labels without per-app template hacks. First consumer: opting a workload into the EKS Fargate isolated tier (per-pod Firecracker microVMs) via podLabels: { parcellab.dev/compute: fargate }, which an EKS Fargate profile selects.

Changes

  • common/_pod.tpl: merge .Values.podLabels into pod template metadata.labels via a single dict merge (managed labels take precedence — no duplicate keys, selector can't be broken)
  • common/values.yaml + microservice/values.yaml: document podLabels: {}
  • version bumps so chart-releaser republishes every consumer with the new common (the feature lives in common, so it applies to all chart types — not just microservice):
    • common 1.3.9 → 1.3.10
    • microservice 0.5.8 → 0.5.9
    • cronjob 0.5.1 → 0.5.2
    • monolith 0.5.9 → 0.5.10
    • worker-group 0.3.4 → 0.3.5

Adds an optional podLabels value merged into the pod template labels only
(the immutable selector is untouched). Enables scheduling controls that key
off pod labels, e.g. opting a workload into an EKS Fargate profile via
{ parcellab.dev/compute: fargate }.

common 1.3.9 -> 1.3.10, microservice 0.5.8 -> 0.5.9.
Copilot AI review requested due to automatic review settings June 15, 2026 10:55
@jmpalomares jmpalomares requested review from a team as code owners June 15, 2026 10:55
@github-actions github-actions Bot added the yaml label Jun 15, 2026

Copilot AI left a comment

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.

Pull request overview

This PR extends the shared common pod template used by the charts (microservice/cronjob/job/deployment/rollout) to support optional user-defined pod-template labels via a new podLabels value, primarily to enable scheduling/routing behaviors (e.g., EKS Fargate profiles) without modifying per-app templates.

Changes:

  • Add support for .Values.podLabels in common pod template metadata.labels (pod template only).
  • Document podLabels: {} in microservice/values.yaml.
  • Bump chart versions for common and microservice.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
parcellab/common/templates/_pod.tpl Adds rendering of user-provided podLabels into pod template labels.
parcellab/microservice/values.yaml Documents the new podLabels value for microservice consumers.
parcellab/common/Chart.yaml Bumps common chart version to 1.3.10.
parcellab/microservice/Chart.yaml Bumps microservice chart version to 0.5.9.

Comment thread parcellab/common/templates/_pod.tpl Outdated
Comment thread parcellab/common/templates/_pod.tpl Outdated
Render pod labels via a single dict merge with managed (selector) labels
taking precedence, preventing user podLabels from duplicating keys or
overriding selector labels (which would break the Deployment/Rollout
selector). Also declare podLabels in common/values.yaml.

Addresses review feedback on #435.
The podLabels feature lives in the shared common library, so it already
applies to every chart. Bump these consumers (which bundle common via
file://) so chart-releaser republishes them carrying common 1.3.10 —
making podLabels available across all chart types, not just microservice.
@andibeuge

Copy link
Copy Markdown
Contributor

Inconsistent podLabels: {} across consumer charts

microservice/values.yaml gets the new podLabels: {} entry, but cronjob, monolith, and worker-group only receive version bumps without the corresponding values update.

In Helm, a library chart's values.yaml defaults are not automatically inherited by consumer charts, so podLabels remains undocumented and invisible to users of those three chart types — they'd have to know to set it from the common docs or source.

Suggest adding podLabels: {} with the same comment to all three consumer values.yaml files for consistency and discoverability.

Library defaults aren't inherited by consumer charts, so declare podLabels: {}
in each so it's discoverable for all chart types, not just microservice.
@jmpalomares jmpalomares merged commit 7d7b185 into main Jun 16, 2026
3 checks passed
@jmpalomares jmpalomares deleted the feat/pod-labels branch June 16, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants