From bcc8061c0c512dea8d7528dbb7f8c8c952a080cd Mon Sep 17 00:00:00 2001 From: Pitos Date: Wed, 5 Jun 2024 11:54:47 +0200 Subject: [PATCH] Add extraEnv for add additional env from configmap or secrets to daemonset --- charts/aws-vpc-cni/templates/daemonset.yaml | 3 +++ charts/aws-vpc-cni/values.yaml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/charts/aws-vpc-cni/templates/daemonset.yaml b/charts/aws-vpc-cni/templates/daemonset.yaml index 07eb1797f7..b011f681a0 100644 --- a/charts/aws-vpc-cni/templates/daemonset.yaml +++ b/charts/aws-vpc-cni/templates/daemonset.yaml @@ -82,6 +82,9 @@ spec: {{- range $key, $value := .Values.env }} - name: {{ $key }} value: {{ $value | quote }} +{{- end }} +{{- with .Values.extraEnv }} + {{- toYaml .| nindent 12 }} {{- end }} - name: MY_NODE_NAME valueFrom: diff --git a/charts/aws-vpc-cni/values.yaml b/charts/aws-vpc-cni/values.yaml index e25c94e791..017f05dfb8 100644 --- a/charts/aws-vpc-cni/values.yaml +++ b/charts/aws-vpc-cni/values.yaml @@ -88,6 +88,25 @@ env: VPC_CNI_VERSION: "v1.18.2" NETWORK_POLICY_ENFORCING_MODE: "standard" +# Add env from configMap or from secrets +# - name: ENV_VAR1 +# valueFrom: +# configMapKeyRef: +# name: example-config +# key: ENV_VAR1 +# - name: ENV_VAR2 +# valueFrom: +# configMapKeyRef: +# name: example-config +# key: ENV_VAR2 +# - name: SECRET_VAR1 +# valueFrom: +# secretKeyRef: +# name: example-secret +# key: SECRET_VAR1 +extraEnv: [] + + # this flag enables you to use the match label that was present in the original daemonset deployed by EKS # You can then annotate and label the original aws-node resources and 'adopt' them into a helm release originalMatchLabels: false