From c35c1b5b9b86ad96b120ed10b183f39cf697f886 Mon Sep 17 00:00:00 2001 From: Schwitzd <15292575+Schwitzd@users.noreply.github.com> Date: Thu, 14 Aug 2025 08:15:08 +0200 Subject: [PATCH] helm: add commonLabels to all resources and pod templates --- script/helm/garage/Chart.yaml | 2 +- script/helm/garage/README.md | 1 + script/helm/garage/templates/_helpers.tpl | 3 +++ script/helm/garage/templates/workload.yaml | 2 +- script/helm/garage/values.yaml | 5 +++++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/script/helm/garage/Chart.yaml b/script/helm/garage/Chart.yaml index d71b27c9..c9ab227c 100644 --- a/script/helm/garage/Chart.yaml +++ b/script/helm/garage/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: garage description: S3-compatible object store for small self-hosted geo-distributed deployments type: application -version: 0.8.0 +version: 0.9.0 appVersion: "v2.0.0" home: https://garagehq.deuxfleurs.fr/ icon: https://garagehq.deuxfleurs.fr/images/garage-logo.svg diff --git a/script/helm/garage/README.md b/script/helm/garage/README.md index a52c9df4..e03ae9e1 100644 --- a/script/helm/garage/README.md +++ b/script/helm/garage/README.md @@ -15,6 +15,7 @@ S3-compatible object store for small self-hosted geo-distributed deployments | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | +| commonLabels | object | `{}` | Extra labels for all resources | | deployment.kind | string | `"StatefulSet"` | Switchable to DaemonSet | | deployment.podManagementPolicy | string | `"OrderedReady"` | If using statefulset, allow Parallel or OrderedReady (default) | | deployment.replicaCount | int | `3` | Number of StatefulSet replicas/garage nodes to start | diff --git a/script/helm/garage/templates/_helpers.tpl b/script/helm/garage/templates/_helpers.tpl index 037a5f1c..f56060b0 100644 --- a/script/helm/garage/templates/_helpers.tpl +++ b/script/helm/garage/templates/_helpers.tpl @@ -47,6 +47,9 @@ helm.sh/chart: {{ include "garage.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ with .Values.commonLabels }} +{{- toYaml . }} +{{- end }} {{- end }} {{/* diff --git a/script/helm/garage/templates/workload.yaml b/script/helm/garage/templates/workload.yaml index d144cb41..4264253e 100644 --- a/script/helm/garage/templates/workload.yaml +++ b/script/helm/garage/templates/workload.yaml @@ -21,7 +21,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "garage.selectorLabels" . | nindent 8 }} + {{- include "garage.labels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/script/helm/garage/values.yaml b/script/helm/garage/values.yaml index beb5bc63..bc1f8f7a 100644 --- a/script/helm/garage/values.yaml +++ b/script/helm/garage/values.yaml @@ -2,6 +2,11 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +# -- Additional labels to add to all resources created by this chart +commonLabels: {} +# app.kubernetes.io/part-of: storage +# team: platform + # Garage configuration. These values go to garage.toml garage: # -- Can be changed for better performance on certain systems