From e2fcf7dd2cbfcbdf91fd9ae71bfe572b4539211f Mon Sep 17 00:00:00 2001 From: Ghislain LE MEUR Date: Mon, 20 Oct 2025 16:58:44 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(helm)=20add=20extraManifests=20suppor?= =?UTF-8?q?t=20for=20custom=20resources?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add ability to inject custom Kubernetes manifests through the values.yaml file. This allows users to deploy additional resources (Deployments, Services, ConfigMaps, etc.) without modifying the chart templates. The template supports multiple input formats: list of objects, map of named objects, and raw YAML strings, providing maximum flexibility for users. - Create templates/extra-objects.yaml with flexible rendering - Add extraManifests parameter in values.yaml with documentation - Support Helm template variables in injected manifests - Handle list, map, and string YAML formats automatically --- src/helm/meet/templates/extra-objects.yaml | 15 +++++++++++++++ src/helm/meet/values.yaml | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/helm/meet/templates/extra-objects.yaml diff --git a/src/helm/meet/templates/extra-objects.yaml b/src/helm/meet/templates/extra-objects.yaml new file mode 100644 index 00000000..b0ec6fad --- /dev/null +++ b/src/helm/meet/templates/extra-objects.yaml @@ -0,0 +1,15 @@ +{{- /* Normalize extraObjects to a list, easier to loop over */ -}} +{{- $extraObjects := .Values.extraManifests | default (list) -}} + +{{- if kindIs "map" $extraObjects -}} + {{- $extraObjects = values $extraObjects -}} +{{- end -}} + +{{- range $extraObjects }} +--- + {{- if kindIs "map" . }} + {{- tpl (toYaml .) $ | nindent 0 }} + {{- else if kindIs "string" . }} + {{- tpl . $ | nindent 0 }} + {{- end }} +{{- end }} diff --git a/src/helm/meet/values.yaml b/src/helm/meet/values.yaml index eca7d54d..cc31d34c 100644 --- a/src/helm/meet/values.yaml +++ b/src/helm/meet/values.yaml @@ -834,3 +834,21 @@ agents: ## @param agents.pdb.enabled Enable pdb on agents pdb: enabled: false + +## @section Extra Manifests + +## @param extraManifests Extra Kubernetes manifests to deploy +## @extra extraManifests[].apiVersion API version of the resource +## @extra extraManifests[].kind Kind of the resource (Deployment, Service, ConfigMap, etc.) +## @extra extraManifests[].metadata Resource metadata +## @extra extraManifests[].spec Resource specification +extraManifests: [] +# - apiVersion: v1 +# kind: ConfigMap +# metadata: +# name: my-custom-config +# data: +# config.json: | +# { +# "feature": "enabled" +# }