Closed metacoma closed 2 weeks ago
Hello @metacoma, sorry for the long delay.
I'll tell you what I would like for us to go in this regard :)
I'd like to change the behaviour a little of how we create these files, for instance adopting this pattern.
instead of:
local kapitan = import 'lib/kapitan.libjsonnet';
{
["apply.sh"]: kapitan.jinja2_template(
"template/apply.sh",
{})
}
I would like us to move towards something like
local kapitan = import 'lib/kapitan.libjsonnet';
{
["apply.sh"]: {
"content": kapitan.jinja2_template("template/apply.sh", {}),
"metadata": {
"mode": 0o700
}
}
The reasoning behind this is that I would like to change the behaviour of other things within kapitan, for instance be able to produce from a single "compile output" multiple types of files (i.e. .md, .json, .sh)
metadata could be expanded in the future to allow for more features.
@metacoma @ramaro WDYT?
Closing in favor of a different approach
Fixes #506
Proposed Changes
Include permissions in the input section to explicitly define access rights for files in compiled directories
Example:
How it works:
This PR is in a very early stage. If this approach for setting file permissions is acceptable, I will continue to work on it; otherwise, let's discuss alternatives.
Docs and Tests