Skip to content

Commit

Permalink
Merge pull request #54 from T-Systems-MMS/feature/secrets_in_k8s_chart
Browse files Browse the repository at this point in the history
New secret template in k8s chart
  • Loading branch information
habr-mms authored May 2, 2023
2 parents d1e1f0f + 53eb986 commit 2ddc616
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion k8s/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
apiVersion: v1
name: k8s
description: Kubernetes Cluster Configuration
version: 0.1.4
version: 0.1.5
20 changes: 20 additions & 0 deletions k8s/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.secret -}}
{{- $secret := .Values.secret }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secret.name | quote }}
namespace: {{ $secret.namespace | quote }}
annotations:
{{- range $key, $value := $secret.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
type: {{ $secret.type }}
{{- if $secret.data }}
data: {{ $secret.data | nindent 2 }}
{{- end }}
{{- if $secret.stringData }}
stringData: {{ $secret.stringData | nindent 2 }}
{{- end }}
{{- end -}}

0 comments on commit 2ddc616

Please sign in to comment.