Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set file mode for inline files. #148

Open
GrahamDumpleton opened this issue Apr 13, 2022 · 2 comments
Open

Ability to set file mode for inline files. #148

GrahamDumpleton opened this issue Apr 13, 2022 · 2 comments
Labels
carvel-accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request good first issue An issue that will be a good candidate for a new contributor priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.

Comments

@GrahamDumpleton
Copy link

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.

@GrahamDumpleton GrahamDumpleton added carvel-triage This issue has not yet been reviewed for validity enhancement This issue is a feature request labels Apr 13, 2022
@joe-kimmel-vmw joe-kimmel-vmw added carvel-accepted This issue should be considered for future work and that the triage process has been completed priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome. good first issue An issue that will be a good candidate for a new contributor and removed carvel-triage This issue has not yet been reviewed for validity labels Apr 13, 2022
@joe-kimmel-vmw
Copy link
Contributor

Thanks @GrahamDumpleton!

@GrahamDumpleton
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel-accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request good first issue An issue that will be a good candidate for a new contributor priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.
Projects
Status: Unprioritized
Development

No branches or pull requests

2 participants