carvel-dev / carvel-dev/vendir
Ability to set file mode for inline files.
- Dominant language
- Go
- Stars
- 399
- Forks
- 73
- Avg merge
- 2h 53m
- Merged PRs (30d)
- 2
Description
**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.
Contributor guide
Assessment
This issue has not been assessed yet.