Skip to content

Commit

Permalink
feat(Helm): Provide sensitive values as secret (#493)
Browse files Browse the repository at this point in the history
Issue: #479
  • Loading branch information
Timo Koller authored Jan 19, 2023
1 parent eff9fcf commit d08f044
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
7 changes: 0 additions & 7 deletions deploy/helm/postee/templates/cfg-configmap.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions deploy/helm/postee/templates/cfg-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "postee.fullname" . }}-secret
data:
cfg.yaml: |
{{ .Values.posteeConfig | b64enc | indent 4 }}
10 changes: 5 additions & 5 deletions deploy/helm/postee/templates/postee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/cfg-configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/cfg-secret.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -72,7 +72,7 @@ spec:
imagePullPolicy: {{ .Values.imageInit.pullPolicy }}
command: ["/bin/cp", "/k8s/cfg.yaml", "/data/cfg.yaml"]
volumeMounts:
- name: {{ $fullName }}-configmap-vol
- name: {{ $fullName }}-secret-vol
mountPath: /k8s
- name: {{ $fullName }}-config
mountPath: {{ .Values.persistentVolume.mountPathConfig }}
Expand Down Expand Up @@ -106,9 +106,9 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- configMap:
name: {{ $fullName }}-cfg
name: {{ $fullName }}-configmap-vol
- secret:
secretName: {{ $fullName }}-secret
name: {{ $fullName }}-secret-vol
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit d08f044

Please sign in to comment.