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": {