A bit better control of env

This commit is contained in:
Nikolai Rodionov 2024-07-15 19:48:53 +02:00
parent 8cbfaec5c2
commit 72b63e4a35
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: softplayer-lib-workload name: softplayer-lib-workload
description: A library to be reused accross softplayer charts description: A library to be reused accross softplayer charts
type: library type: library
version: 0.2.0 version: 0.2.1
maintainers: maintainers:
- name: allanger - name: allanger
email: allanger@badhouseplants.net email: allanger@badhouseplants.net

View File

@ -1,6 +1,7 @@
{{- define "lib.config.env" -}} {{- define "lib.config.env" -}}
{{- range $k, $v := .Values.env }} {{- range $k, $v := .Values.env }}
{{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }} {{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }}
{{- if $v.enabled }}
--- ---
apiVersion: v1 apiVersion: v1
{{- if not $v.sensitive }} {{- if not $v.sensitive }}
@ -13,8 +14,10 @@ kind: Secret
stringData: stringData:
{{- end }} {{- end }}
{{- range $key, $value := $v.data }} {{- range $key, $value := $v.data }}
{{- if $value }}
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}} {{- end -}}