File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ {{- $configMapName := printf "%s-config" (include "PolyNSI.fullname" .) }}
2+
3+ {{- $shouldCreate := true }}
4+ {{- if .Values.config.checkExistence }}
5+ {{- $shouldCreate = not (lookup "v1" "ConfigMap" .Release.Namespace $configMapName) }}
6+ {{- end }}
7+
8+ {{- if $shouldCreate }}
19apiVersion : v1
210kind : ConfigMap
311metadata :
4- name : {{ printf "%s-config" (include "PolyNSI.fullname" .) }}
12+ name : {{ $configMapName }}
513# namespace: {{ .Release.Namespace }}
614{{- if .Values.config.filesGlob }}
715binaryData :
@@ -12,4 +20,5 @@ binaryData:
1220{{ else if .Values.config.inline }}
1321data :
1422{{.Values.config.inline | indent 2}}
15- {{ end }}
23+ {{ end }}
24+ {{- end }}
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ truststore:
9898 key : truststore.jks
9999
100100config :
101+ checkExistence : false # Set to true to not overwrite existing configmap.
101102 # either read config files from folder or use inline data, filesGlob takes precedence over inline.
102103 # filesGlob: "config/*"
103104 inline : |-
You can’t perform that action at this time.
0 commit comments