Skip to content

Commit 3108064

Browse files
authored
Fix extraEnv field placed inside unrelated if clause (#190)
1 parent 020c144 commit 3108064

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

mirrord-operator/templates/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ spec:
114114
{{- end }}
115115
- name: OPERATOR_LICENSE_ALLOW_SEAT_OVERAGES
116116
value: {{ .Values.license.allowSeatOverages | ternary "true" "false" | quote }}
117-
{{- if or .Values.license.file.data .Values.license.pemRef }}
118-
- name: OPERATOR_LICENSE_PATH
119-
value: /license/license.pem
120-
{{- else if .Values.license.key }}
121117
{{- range $key, $val := .Values.operator.extraEnv }}
122118
- name: {{ $key }}
123119
value: {{ $val | quote }}
124120
{{- end }}
121+
{{- if or .Values.license.file.data .Values.license.pemRef }}
122+
- name: OPERATOR_LICENSE_PATH
123+
value: /license/license.pem
124+
{{- else if .Values.license.key }}
125125
envFrom:
126126
- secretRef:
127127
name: {{ .Values.license.file.secret }}

test_values/extra_env.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
license:
2+
file:
3+
secret: mirrord-operator-license
4+
data:
5+
license.pem: "DOESN'TNEEDTOBOOTSOITCANBEINVALID"
6+
7+
operator:
8+
extraEnv:
9+
OPERATOR_COPY_TARGET_RUN_AS_USER_VALUE: 0
10+
OPERATOR_COPY_TARGET_RUN_AS_USER_FIELD: "value"

0 commit comments

Comments
 (0)