From 91eec5e0c3be8e828eb8ccfaa6d2d9c5b1bc6817 Mon Sep 17 00:00:00 2001 From: mliptak0 Date: Mon, 15 Jun 2026 13:52:38 +0200 Subject: [PATCH] HYPERFLEET-1108 - feat: add support for custom labels in Helm chart Add support for custom labels via .Values.labels that are applied to all Helm-managed resources (Deployment, Service, ServiceAccount, ClusterRole, ClusterRoleBinding, ConfigMaps, etc.). Include commented-out example in values.yaml to make the feature discoverable without requiring inspection of _helpers.tpl. Enables E2E test cleanup by labeling resources with run IDs. Co-Authored-By: Claude --- charts/templates/_helpers.tpl | 3 +++ charts/values.yaml | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/charts/templates/_helpers.tpl b/charts/templates/_helpers.tpl index 6ebf527..4bda36d 100644 --- a/charts/templates/_helpers.tpl +++ b/charts/templates/_helpers.tpl @@ -38,6 +38,9 @@ helm.sh/chart: {{ include "hyperfleet-adapter.chart" . }} {{ include "hyperfleet-adapter.selectorLabels" . }} app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- with .Values.labels }} +{{ toYaml . }} +{{- end }} {{- end }} {{/* diff --git a/charts/values.yaml b/charts/values.yaml index e2cbaff..9e67897 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -226,6 +226,16 @@ podDisruptionBudget: # -- Additional labels applied to all pods podLabels: {} +# -- Custom labels applied to all resources managed by this Helm chart +# (Deployment, Service, ServiceAccount, ClusterRole, ClusterRoleBinding, ConfigMaps, etc.) +# Useful for labeling resources for cleanup, tracking, or organization. +# Example: +# labels: +# environment: production +# team: platform +# hyperfleet-e2e-run: e2e-20260615-102422-bb5nfo2d +# labels: {} + # -- Pod-level security context podSecurityContext: # -- Filesystem group for volume mounts