Showing how to use `subPath` mounts (#2480)

This commit is contained in:
Jesse Glick 2024-04-17 17:13:08 -04:00 committed by GitHub
parent 062f170d44
commit 2932786c4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 1 deletions

View File

@ -196,7 +196,23 @@ data:
filename: {{ "encoded string" | b64enc }}
```
can be used as:
can be used from a pod containing
```yaml
containers:
- name: jenkins
volumeMounts:
- name: filename-secret
mountPath: /run/secrets/filename
subPath: filename
readOnly: true
volumes:
- name: filename-secret
secret:
secretName: secret-name
```
as:
```yaml
- credentials: