secrets/configmaps added
This commit is contained in:
parent
d52444b21c
commit
61d3fe832f
28
templates/_configmaps.tpl
Normal file
28
templates/_configmaps.tpl
Normal file
@ -0,0 +1,28 @@
|
||||
{{- define "lib.configs" -}}
|
||||
{{- $fullName := include "lib.fullname" . -}}
|
||||
{{- $namespace := .Values.namespace -}}
|
||||
{{- $commonLabels := include "lib.labels" . }}
|
||||
{{- range $name, $values := .Values.configs }}
|
||||
{{- if $values.enabled -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $fullName }}-{{ $name }}
|
||||
namespace: {{ $namespace }}
|
||||
labels:
|
||||
{{- $commonLabels | nindent 4 }}
|
||||
{{- with $values.labels }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with $values.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with $values.data }}
|
||||
data:
|
||||
{{- tpl (toYaml .) $ | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
33
templates/_secrets.tpl
Normal file
33
templates/_secrets.tpl
Normal file
@ -0,0 +1,33 @@
|
||||
{{- define "lib.secrets" -}}
|
||||
{{- $fullName := include "lib.fullname" . -}}
|
||||
{{- $namespace := .Values.namespace -}}
|
||||
{{- $commonLabels := include "lib.labels" . }}
|
||||
{{- range $name, $values := .Values.secrets }}
|
||||
{{- if $values.enabled -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $fullName }}-{{ $name }}
|
||||
namespace: {{ $namespace }}
|
||||
labels:
|
||||
{{- $commonLabels | nindent 4 }}
|
||||
{{- with $values.labels }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with $values.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
type: {{ $values.type | default "Opauge" }}
|
||||
{{- with $values.data }}
|
||||
data:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with $values.stringData }}
|
||||
stringData:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
Loading…
Reference in New Issue
Block a user