Allow "path" to point at specific files
Closed this issue · 6 comments
Really looking forward to this – this is the one feature that blocks me from switching from ktmpl to this project. I'm not sure how your rewrite in Rust is going but if there is anything I can do to help get this done please let me know.
Hey!
The rewrite stagnated a bit because I've had some personal issues to deal with over the last month. There are so many things in the backlog here now that I'll probably end up doing another Go-release.
There are a few open questions for this particular feature and your input would be welcome:
-
If path is unset and no folder exists, should kontemplate attempt to find a
$name.yml/yaml/json
file anyways? -
If yes, what happens if both a
$name
folder and$name.yaml
were to exist? -
When using the path parameter, do you think this is an acceptable implementation:
include:
- name: some-service
path: stuff/some-service.yaml
values: [ ... ]
-
I don't think
$name.yml/yaml/json
makes sense. If there is a name but no path, stick to the current default -
I see two options, both are fit my use case well enough: a) if a path is unspecified, use a folder by default (only use a file if
path
is explicitly set and a regular file); or b) if a path is unspecified, use a folder by default, and a file named$name.yml
only if the folder does not exist -
Sure!
I agree with @rolftimmermans but I would answer:
- I don't think $name.yml/yaml/json makes sense. If there is a name but no path, stick to the current default
- It won't happen because the previous answer is no :)
- Yes!
And if a path is specified, it must have a file extension attached. It would be necessary to difference between folder and file.
This functionality is useful because I have a file for each deployment, service, hpa and configmap in the same resource set. For this reason, some times I want to update only a specific file and I don't want to create a folder for each kuberentes file...
Change is included in version 1.6.0!