Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extraEnv for add additional env from configmap or secrets to daem… #2946

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/aws-vpc-cni/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions charts/aws-vpc-cni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the above example comment below line 107.
You could keep it as single example instead 3, and comment it as

Optional: Additional environment variables for helm chart.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, as I understand, this is helm chart only feature. This wont be supported by self managed addon (applying yaml directly, in which case, they will have to edit the environment variables directly and with MAO.

The cost of maintaining this difference needs to be considered.

If it is strictly not required, I would consider dropping this, if any other workaround is available with helm chart.



# 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
Expand Down
Loading