Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Support mounting existing secrets as files #213

Merged
merged 2 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions charts/kubernetes-external-secrets/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ spec:
name: {{ $value.secretKeyRef | quote }}
key: {{ $value.key | quote }}
{{- end }}
{{- with .Values.filesFromSecret }}
volumeMounts:
{{- range $key, $value := . }}
- name: {{ $key }}
mountPath: {{ $value.mountPath }}
readOnly: true
{{- end }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand All @@ -64,3 +72,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.filesFromSecret }}
volumes:
{{- range $key, $value := . }}
- name: {{ $key }}
secret:
secretName: {{ $value.secret }}
{{- end }}
{{- end }}
8 changes: 7 additions & 1 deletion charts/kubernetes-external-secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
METRICS_PORT: 3001
VAULT_ADDR: http://127.0.0.1:8200

# Create environment variables from exists k8s secrets
# Create environment variables from existing k8s secrets
# envVarsFromSecret:
# AWS_ACCESS_KEY_ID:
# secretKeyRef: aws-credentials
Expand All @@ -19,6 +19,12 @@ env:
# secretKeyRef: aws-credentials
# key: key

# Create files from existing k8s secrets
# filesFromSecret:
# examplefile:
# secret: secretname
# mountPath: /a/mount/point/

rbac:
# Specifies whether RBAC resources should be created
create: true
Expand Down