Merge pull request #72 from pnieweglowski/master

Add subPath property for secrets (#1)
This commit is contained in:
Youcef Guichi
2023-06-05 13:48:02 +02:00
committed by GitHub
5 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -15,4 +15,4 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0
@@ -13,11 +13,17 @@ volumeMounts: &volumeMounts
{{- range .Values.sealedFileSecrets }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- if .subPath}}
subPath: {{ .subPath }}
{{- end }}
readOnly: true
{{- end }}
{{- range .Values.fileSecrets }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- if .subPath}}
subPath: {{ .subPath }}
{{- end }}
readOnly: true
{{- end }}
{{- range .Values.existingFileSecrets }}
+1 -1
View File
@@ -19,5 +19,5 @@ version: 0.48.0
dependencies:
- name: common
version: 0.2.0
version: 0.3.0
repository: file://../common
+1 -1
View File
@@ -19,5 +19,5 @@ version: 0.48.0
dependencies:
- name: common
version: 0.2.0
version: 0.3.0
repository: file://../common
@@ -18,6 +18,22 @@ tests:
- name: google-account-key
mountPath: /google-account-key
readOnly: true
- it: Should mount volume with optional subPath
set:
fileSecrets:
- name: google-account-key
path: /config/google-account-key
subPath: google-account-key
secrets:
key.json: supersecret
asserts:
- equal:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: google-account-key
mountPath: /config/google-account-key
subPath: google-account-key
readOnly: true
- it: Should reference volume
set:
fileSecrets: