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..31913c6 100644 --- a/parcellab/common/templates/_pod.tpl +++ b/parcellab/common/templates/_pod.tpl @@ -38,11 +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 }} + {{- $_ := 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: {} 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/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/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: 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/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/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: "*" 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