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

fix: support complex extra env var map #70

Merged
merged 1 commit into from
Oct 2, 2024
Merged
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
8 changes: 8 additions & 0 deletions examples/deployment/cert-manager.yml
Original file line number Diff line number Diff line change
@@ -68,3 +68,11 @@ externalSecrets:
tenant: test-tenant
updateStrategy:
type: Recreate

extraEnvVarsMap:
TEST: value
TEST_SECRET:
valueFrom:
secretKeyRef:
name: my-custom-secret-name
key: test
4 changes: 2 additions & 2 deletions ndustrial/cronjob/Chart.yaml
Original file line number Diff line number Diff line change
@@ -14,5 +14,5 @@ maintainers:
- email: devops@ndustrial.io
name: DevOps
# Please make sure that version and appVersion are always the same.
version: 0.1.29
appVersion: 0.1.29
version: 0.1.30
appVersion: 0.1.30
4 changes: 4 additions & 0 deletions ndustrial/cronjob/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -125,9 +125,13 @@ spec:
{{- if .Values.extraEnvVarsMap }}
{{- range $key, $val := .Values.extraEnvVarsMap }}
- name: {{ $key }}
{{- if (kindIs "map" $val ) }}
{{- include "nio-common.tplvalues.render" (dict "value" $val "context" $) | nindent 18 }}
{{- else }}
value: {{ include "nio-common.tplvalues.render" (dict "value" $val "context" $) | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.datadog }}
{{- include "nio-common.datadog.envs" (dict "value" .Values.datadog "context" $) | nindent 16 }}
{{- end }}
7 changes: 6 additions & 1 deletion ndustrial/cronjob/values.yaml
Original file line number Diff line number Diff line change
@@ -162,10 +162,15 @@ shareProcessNamespace: false
##
extraEnvVars: []

## @param extraEnvVarsMap Add extra environment variables to the Deployment container
## @param extraEnvVarsMap Add extra environment variables to the Deployment container. Can be a single string or a valid environment mapping
## E.g:
## extraEnvVarsMap:
## FOO: "bar"
## FOO_SECRET:
## valueFrom:
## secretKeyRef:
## name: secret
## key: test
##
extraEnvVarsMap: {}

4 changes: 2 additions & 2 deletions ndustrial/daemonset/Chart.yaml
Original file line number Diff line number Diff line change
@@ -13,5 +13,5 @@ maintainers:
- email: devops@ndustrial.io
name: DevOps
# Please make sure that version and appVersion are always the same.
version: 0.1.7
appVersion: 0.1.7
version: 0.1.8
appVersion: 0.1.8
4 changes: 4 additions & 0 deletions ndustrial/daemonset/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -90,9 +90,13 @@ spec:
{{- if .Values.extraEnvVarsMap }}
{{- range $key, $val := .Values.extraEnvVarsMap }}
- name: {{ $key }}
{{- if (kindIs "map" $val ) }}
{{- include "nio-common.tplvalues.render" (dict "value" $val "context" $) | nindent 14 }}
{{- else }}
value: {{ include "nio-common.tplvalues.render" (dict "value" $val "context" $) | quote }}
{{- end }}
{{- end }}
{{- end }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
5 changes: 5 additions & 0 deletions ndustrial/daemonset/values.yaml
Original file line number Diff line number Diff line change
@@ -340,6 +340,11 @@ extraEnvVars: []
## E.g:
## extraEnvVarsMap:
## FOO: "bar"
## FOO_SECRET:
## valueFrom:
## secretKeyRef:
## name: secret
## key: test
##
extraEnvVarsMap: {}

4 changes: 2 additions & 2 deletions ndustrial/deployment/Chart.yaml
Original file line number Diff line number Diff line change
@@ -13,5 +13,5 @@ maintainers:
- email: devops@ndustrial.io
name: DevOps
# Please make sure that version and appVersion are always the same.
version: 0.1.63
appVersion: 0.1.63
version: 0.1.64
appVersion: 0.1.64
4 changes: 4 additions & 0 deletions ndustrial/deployment/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -104,9 +104,13 @@ spec:
{{- if .Values.extraEnvVarsMap }}
{{- range $key, $val := .Values.extraEnvVarsMap }}
- name: {{ $key }}
{{- if (kindIs "map" $val ) }}
{{- include "nio-common.tplvalues.render" (dict "value" $val "context" $) | nindent 14 }}
{{- else }}
value: {{ include "nio-common.tplvalues.render" (dict "value" $val "context" $) | quote }}
{{- end }}
{{- end }}
{{- end }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
5 changes: 5 additions & 0 deletions ndustrial/deployment/values.yaml
Original file line number Diff line number Diff line change
@@ -389,6 +389,11 @@ extraEnvVars: []
## E.g:
## extraEnvVarsMap:
## FOO: "bar"
## FOO_SECRET:
## valueFrom:
## secretKeyRef:
## name: secret
## key: test
##
extraEnvVarsMap: {}

4 changes: 2 additions & 2 deletions ndustrial/nio-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -13,5 +13,5 @@ maintainers:
- email: devops@ndustrial.io
name: DevOps
# Please make sure that version and appVersion are always the same.
version: 1.0.11
appVersion: 1.0.11
version: 1.0.12
appVersion: 1.0.12
5 changes: 5 additions & 0 deletions ndustrial/nio-api/values.yaml
Original file line number Diff line number Diff line change
@@ -365,6 +365,11 @@ extraEnvVars: []
## E.g:
## extraEnvVarsMap:
## FOO: "bar"
## FOO_SECRET:
## valueFrom:
## secretKeyRef:
## name: secret
## key: test
##
extraEnvVarsMap: {}
## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars
4 changes: 2 additions & 2 deletions ndustrial/statefulset/Chart.yaml
Original file line number Diff line number Diff line change
@@ -12,5 +12,5 @@ maintainers:
- email: devops@ndustrial.io
name: DevOps
# Please make sure that version and appVersion are always the same.
version: 0.1.39
appVersion: 0.1.39
version: 0.1.40
appVersion: 0.1.40
4 changes: 4 additions & 0 deletions ndustrial/statefulset/templates/statefuleset.yaml
Original file line number Diff line number Diff line change
@@ -105,9 +105,13 @@ spec:
{{- if .Values.extraEnvVarsMap }}
{{- range $key, $val := .Values.extraEnvVarsMap }}
- name: {{ $key }}
{{- if (kindIs "map" $val ) }}
{{- include "nio-common.tplvalues.render" (dict "value" $val "context" $) | nindent 14 }}
{{- else }}
value: {{ include "nio-common.tplvalues.render" (dict "value" $val "context" $) | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.datadog }}
{{- include "nio-common.datadog.envs" (dict "value" .Values.datadog "context" $) | nindent 12 }}
{{- end }}
5 changes: 5 additions & 0 deletions ndustrial/statefulset/values.yaml
Original file line number Diff line number Diff line change
@@ -363,6 +363,11 @@ extraEnvVars: []
## E.g:
## extraEnvVarsMap:
## FOO: "bar"
## FOO_SECRET:
## valueFrom:
## secretKeyRef:
## name: secret
## key: test
##
extraEnvVarsMap: {}