Ability to set file mode for inline files.
Describe the problem/challenge you have
I want to be able to do:
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: packages/example
contents:
- path: .
inline:
paths:
script.sh: |
#!/bin/bash
date
where script.sh needs to have execute file mode permissions when created.
At the moment it is always created with only rw- permissions.
Describe the solution you'd like
Like how in Kubernetes when mounting config maps it is possible to specify a defaultMode with a umask, would like something similar.
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: packages/example
contents:
- path: .
inline:
paths:
script.sh: |
#!/bin/bash
date
defaultMode: 0755
Anything else you would like to add:
It is a bit annoying that this can't be specified on a per file basis, but a default mode for all paths is better than nothing. One can always segregate files that need to be executable under different array item under contents.
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help work on this issue.
Thanks @GrahamDumpleton!
Adding this here and not as a separate issue as falls under same umbrella, but this ability to set file mode also needs to apply to files introduced from secrets or config maps using inline.pathsFrom.
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: packages/example
contents:
- path: .
inline:
pathsFrom:
secretRef:
name: my-scripts
defaultMode: 0755