Skip to content

Commit bb109c8

Browse files
imeliraneliranb
authored andcommitted
DEVOPS-2761-fixed-not-create-system-configuration-if-content-and-signature-empty (#71)
1 parent 1371792 commit bb109c8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

chart/templates/backend-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ 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
@@ -126,6 +127,7 @@ spec:
126127
"/usr/src/lightrun/{{ .Values.deployments.backend.jar_name }}"
127128
]
128129
volumeMounts:
130+
{{- if and .Values.general.system_config.content .Values.general.system_config.signature }}
129131
- name: system-config
130132
mountPath: {{ .Values.general.system_config.file_path }}
131133
subPath: {{ base .Values.general.system_config.file_path }}
@@ -190,6 +192,7 @@ spec:
190192
- secretRef:
191193
name: {{ include "secrets.backend.name" . }}
192194
env:
195+
{{- if and .Values.general.system_config.content .Values.general.system_config.signature }}
193196
- name: LIGHTRUN_SYSTEM_CONFIG_JSON_FILE_PATH
194197
value: {{ .Values.general.system_config.file_path }}
195198
- name: LIGHTRUN_SYSTEM_CONFIG_JSON_SIGNATURE
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)