Skip to content

Commit db1bcc7

Browse files
authored
DEVOPS-2761-fixed-not-create-system-configuration-if-content-and-signature-empty (#71)
1 parent 47cc7d1 commit db1bcc7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

chart/templates/backend-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ spec:
6060
{{- end }}
6161
serviceAccountName: {{ template "lightrun-be.serviceAccountName" . }}
6262
volumes:
63+
{{- if and .Values.general.system_config.content .Values.general.system_config.signature }}
6364
- name: system-config
6465
configMap:
6566
name: {{ include "lightrun.fullname" . }}-system-config
67+
{{- end }}
6668
- name: encryption-keys
6769
secret:
6870
secretName: {{ include "secrets.backend.name" . }}
@@ -133,10 +135,12 @@ spec:
133135
"/usr/src/lightrun/{{ .Values.deployments.backend.jar_name }}"
134136
]
135137
volumeMounts:
138+
{{- if and .Values.general.system_config.content .Values.general.system_config.signature }}
136139
- name: system-config
137140
mountPath: {{ .Values.general.system_config.file_path }}
138141
subPath: {{ base .Values.general.system_config.file_path }}
139142
readOnly: true
143+
{{- end }}
140144
- name: encryption-keys
141145
mountPath: /encryption-keys
142146
readOnly: true
@@ -200,10 +204,12 @@ spec:
200204
- secretRef:
201205
name: {{ include "secrets.backend.name" . }}
202206
env:
207+
{{- if and .Values.general.system_config.content .Values.general.system_config.signature }}
203208
- name: LIGHTRUN_SYSTEM_CONFIG_JSON_FILE_PATH
204209
value: {{ .Values.general.system_config.file_path }}
205210
- name: LIGHTRUN_SYSTEM_CONFIG_JSON_SIGNATURE
206211
value: {{ .Values.general.system_config.signature }}
212+
{{- end }}
207213
- name: SERVER_SECURITY_ENCRYPTION-KEYS-PATH
208214
value: file:/encryption-keys
209215
- name: LIGHTRUN_HOSTNAME
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
{{- if and .Values.general.system_config.content .Values.general.system_config.signature }}
12
kind: ConfigMap
23
apiVersion: v1
34
metadata:
45
name: {{ include "lightrun.fullname" . }}-system-config
56
data:
6-
system_config.json: {{ .Values.general.system_config.content }}
7+
system_config.json: {{ .Values.general.system_config.content | b64dec | quote }}
8+
{{- end }}

0 commit comments

Comments
 (0)