From 9396e194ca60ee483131e067912a0ac66946f53f Mon Sep 17 00:00:00 2001 From: Panos Koutsovasilis Date: Tue, 12 Nov 2024 16:18:09 +0200 Subject: [PATCH] [helm] add envFrom in agent preset (#5992) --- .../templates/agent/eck/_pod_template.yaml | 4 ++++ .../templates/agent/k8s/_pod_template.yaml | 4 ++++ deploy/helm/elastic-agent/values.schema.json | 16 ++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/deploy/helm/elastic-agent/templates/agent/eck/_pod_template.yaml b/deploy/helm/elastic-agent/templates/agent/eck/_pod_template.yaml index 38dd07a7f54..b1eed384275 100644 --- a/deploy/helm/elastic-agent/templates/agent/eck/_pod_template.yaml +++ b/deploy/helm/elastic-agent/templates/agent/eck/_pod_template.yaml @@ -97,4 +97,8 @@ template: {{- end }} {{- end }} {{- end }} + {{- with ($presetVal).envFrom }} + envFrom: + {{- . | toYaml | nindent 10}} + {{- end }} {{- end }} diff --git a/deploy/helm/elastic-agent/templates/agent/k8s/_pod_template.yaml b/deploy/helm/elastic-agent/templates/agent/k8s/_pod_template.yaml index ea666ffd0c1..5563531e97e 100644 --- a/deploy/helm/elastic-agent/templates/agent/k8s/_pod_template.yaml +++ b/deploy/helm/elastic-agent/templates/agent/k8s/_pod_template.yaml @@ -139,4 +139,8 @@ template: {{- end }} {{- end }} {{- end }} + {{- with ($presetVal).envFrom }} + envFrom: + {{- . | toYaml | nindent 10}} + {{- end }} {{- end }} diff --git a/deploy/helm/elastic-agent/values.schema.json b/deploy/helm/elastic-agent/values.schema.json index 694b922ea52..79032556957 100644 --- a/deploy/helm/elastic-agent/values.schema.json +++ b/deploy/helm/elastic-agent/values.schema.json @@ -1058,6 +1058,22 @@ "clusterRole": { "$ref": "#/definitions/AgentPresetClusterRole" }, + "envFrom": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Environment variables for the deployment.", + "examples": [ + [ + { + "configMapRef": { + "name": "my-config" + } + } + ] + ] + }, "nodeSelector": { "type": "object", "additionalProperties": {