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

Jsonnet doesn't remember file mode #506

Open
pvanderlinden opened this issue May 7, 2020 · 4 comments
Open

Jsonnet doesn't remember file mode #506

pvanderlinden opened this issue May 7, 2020 · 4 comments
Labels
bug easy difficulty: easy Stale

Comments

@pvanderlinden
Copy link
Contributor

Describe the bug/feature
When you render a file with the jinja2 input type, it remembers the file mode (e.g. executable). With the jsonnet input type this is not working.

To Reproduce
Steps to reproduce the behavior:

  • Have a jsonnet input with the following main.jsonnet:
local kapitan = import 'lib/kapitan.libjsonnet';
{
  ["apply.sh"]: kapitan.jinja2_template(
    "template/apply.sh", 
    {})
}
  • make sure template/apply.sh exists and has executable flags (chmod +x template/apply.sh)
  • the output has no executable flag after compiling

Expected behavior
the output file apply.sh should have the same file mode as the input template

@uberspot uberspot added bug easy difficulty: easy labels May 7, 2020
@sanyam1997
Copy link

Hey, I would like to work on this issue. I am a first-time contributor. Can you suggest relevant resources to be studied for working on this issue?

@ramaro
Copy link
Member

ramaro commented Jun 17, 2020

Hey @sanyam1997 this particular issue requires a bit more thought as jsonnet per se does not allow doing this. An idea to solve this issue is to allow setting a new option in the inventory to set the mode file permissions for a particular pattern of files.
I suggest you have a look at the inputs/base.py which already has basic support for this, but needs to be rethought.

@sanyam1997
Copy link

Hey @ramaro, I am new to open source and was looking for some guidance during the initial phase of open source contribution. Can you please email me at rajpalsanyam1997@gmail.com?

Copy link

This issue is stale because it has been open for 1 year with no activity.
Remove the stale label or comment if this issue is still relevant for you.
If not, please close it yourself.

@github-actions github-actions bot added the Stale label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug easy difficulty: easy Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants