From fbcbd3c820b37560549771ad92a5313b7be5b48a Mon Sep 17 00:00:00 2001 From: Jose Palomares Date: Mon, 15 Jun 2026 12:52:30 +0200 Subject: [PATCH 1/4] feat: add podLabels to pod template 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. --- parcellab/common/Chart.yaml | 2 +- parcellab/common/templates/_pod.tpl | 3 +++ parcellab/microservice/Chart.yaml | 2 +- parcellab/microservice/values.yaml | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/parcellab/common/Chart.yaml b/parcellab/common/Chart.yaml index dcf1e95..c4a4466 100644 --- a/parcellab/common/Chart.yaml +++ b/parcellab/common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: common description: A Helm chart library for parcelLab charts type: library -version: 1.3.9 +version: 1.3.10 maintainers: - name: parcelLab email: engineering@parcellab.com diff --git a/parcellab/common/templates/_pod.tpl b/parcellab/common/templates/_pod.tpl index 440d1ae..e6598bd 100644 --- a/parcellab/common/templates/_pod.tpl +++ b/parcellab/common/templates/_pod.tpl @@ -43,6 +43,9 @@ metadata: tags.datadoghq.com/env: {{ include "common.env" . | quote }} tags.datadoghq.com/service: {{ $fullname | quote }} {{- end }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/parcellab/microservice/Chart.yaml b/parcellab/microservice/Chart.yaml index a584350..8fde74b 100644 --- a/parcellab/microservice/Chart.yaml +++ b/parcellab/microservice/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: microservice description: Simple microservice -version: 0.5.8 +version: 0.5.9 dependencies: - name: common version: "*" diff --git a/parcellab/microservice/values.yaml b/parcellab/microservice/values.yaml index 6463355..6da625f 100644 --- a/parcellab/microservice/values.yaml +++ b/parcellab/microservice/values.yaml @@ -363,6 +363,11 @@ serviceAccount: podAnnotations: {} +# Extra labels added to the pod template only (not the selector, which stays +# immutable). Useful for scheduling controls that key off pod labels, e.g. +# opting into an EKS Fargate profile: { parcellab.dev/compute: fargate }. +podLabels: {} + replicaCount: 1 strategy: From 096ba1f2bdaa238daf5a359203c31d91e6909096 Mon Sep 17 00:00:00 2001 From: Jose Palomares Date: Mon, 15 Jun 2026 14:18:02 +0200 Subject: [PATCH 2/4] fix(common): merge podLabels so managed labels can't be overridden 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. --- parcellab/common/templates/_pod.tpl | 12 ++++++------ parcellab/common/values.yaml | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/parcellab/common/templates/_pod.tpl b/parcellab/common/templates/_pod.tpl index e6598bd..31913c6 100644 --- a/parcellab/common/templates/_pod.tpl +++ b/parcellab/common/templates/_pod.tpl @@ -38,14 +38,14 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - {{- include "common.labels" $componentValues | nindent 4 }} + {{- /* Merge into one dict so user podLabels can't duplicate keys or override + the managed selector labels (which would break the Deployment selector). */}} + {{- $managed := include "common.labels" $componentValues | fromYaml }} {{- if and $datadog $datadog.enabled }} - tags.datadoghq.com/env: {{ include "common.env" . | quote }} - tags.datadoghq.com/service: {{ $fullname | quote }} - {{- end }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 4 }} + {{- $_ := set $managed "tags.datadoghq.com/env" (include "common.env" . | trim) }} + {{- $_ := set $managed "tags.datadoghq.com/service" $fullname }} {{- end }} + {{- toYaml (merge $managed (.Values.podLabels | default dict)) | nindent 4 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/parcellab/common/values.yaml b/parcellab/common/values.yaml index 8f64b0c..c0c411f 100644 --- a/parcellab/common/values.yaml +++ b/parcellab/common/values.yaml @@ -36,6 +36,9 @@ terminationGracePeriodSeconds: 30 nodeSelector: {} orgRepository: ghcr.io/parcellab podAnnotations: {} +# Extra labels added to the pod template only (merged so they can never override +# the managed selector labels). E.g. { parcellab.dev/compute: fargate }. +podLabels: {} podDisruptionBudget: enabled: false podSecurityContext: {} From 03415101d010ae68cbb05870fdc0e7f63cc10f9a Mon Sep 17 00:00:00 2001 From: Jose Palomares Date: Mon, 15 Jun 2026 15:42:49 +0200 Subject: [PATCH 3/4] chore: release cronjob/monolith/worker-group with podLabels support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- parcellab/cronjob/Chart.yaml | 2 +- parcellab/monolith/Chart.yaml | 2 +- parcellab/worker-group/Chart.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parcellab/cronjob/Chart.yaml b/parcellab/cronjob/Chart.yaml index 19fa84a..96bb64c 100644 --- a/parcellab/cronjob/Chart.yaml +++ b/parcellab/cronjob/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cronjob description: Single cron job -version: 0.5.1 +version: 0.5.2 dependencies: - name: common version: "*" diff --git a/parcellab/monolith/Chart.yaml b/parcellab/monolith/Chart.yaml index a895ad7..76fff35 100644 --- a/parcellab/monolith/Chart.yaml +++ b/parcellab/monolith/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: monolith description: Application that may define multiple services and cronjobs -version: 0.5.9 +version: 0.5.10 dependencies: - name: common version: "*" diff --git a/parcellab/worker-group/Chart.yaml b/parcellab/worker-group/Chart.yaml index 82b88bf..1a8885c 100644 --- a/parcellab/worker-group/Chart.yaml +++ b/parcellab/worker-group/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: worker-group description: Set of workers that do not expose a service -version: 0.3.4 +version: 0.3.5 dependencies: - name: common version: "*" From 9ee5ac5062e3609d1ccaff626f436f0bb4aecd1a Mon Sep 17 00:00:00 2001 From: Jose Palomares Date: Tue, 16 Jun 2026 14:08:47 +0200 Subject: [PATCH 4/4] docs: document podLabels in cronjob/monolith/worker-group values Library defaults aren't inherited by consumer charts, so declare podLabels: {} in each so it's discoverable for all chart types, not just microservice. --- parcellab/cronjob/values.yaml | 5 +++++ parcellab/monolith/values.yaml | 5 +++++ parcellab/worker-group/values.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/parcellab/cronjob/values.yaml b/parcellab/cronjob/values.yaml index 5938b40..23751e7 100644 --- a/parcellab/cronjob/values.yaml +++ b/parcellab/cronjob/values.yaml @@ -78,6 +78,11 @@ nodeSelector: {} podAnnotations: {} +# Extra labels added to the pod template only (not the selector, which stays +# immutable). Useful for scheduling controls that key off pod labels, e.g. +# opting into an EKS Fargate profile: { parcellab.dev/compute: fargate }. +podLabels: {} + securityContext: {} # capabilities: diff --git a/parcellab/monolith/values.yaml b/parcellab/monolith/values.yaml index f60ec31..973fda1 100644 --- a/parcellab/monolith/values.yaml +++ b/parcellab/monolith/values.yaml @@ -512,6 +512,11 @@ serviceAccount: podAnnotations: {} +# Extra labels added to the pod template only (not the selector, which stays +# immutable). Useful for scheduling controls that key off pod labels, e.g. +# opting into an EKS Fargate profile: { parcellab.dev/compute: fargate }. +podLabels: {} + deploymentAnnotations: {} replicaCount: 1 diff --git a/parcellab/worker-group/values.yaml b/parcellab/worker-group/values.yaml index 04b1f6b..38be6ac 100644 --- a/parcellab/worker-group/values.yaml +++ b/parcellab/worker-group/values.yaml @@ -166,6 +166,11 @@ serviceAccount: podAnnotations: {} +# Extra labels added to the pod template only (not the selector, which stays +# immutable). Useful for scheduling controls that key off pod labels, e.g. +# opting into an EKS Fargate profile: { parcellab.dev/compute: fargate }. +podLabels: {} + replicaCount: 1 disableReplicaCount: false