Add --include-file / --exclude-file for specific files in resource sets #69
Comments
Currently include/exclude works on resource sets (i.e. the whole folder containing resources and potentially default values). I could theoretically extend that to allow targeting specific files but there are a few considerations (do default vars still get loaded from the files basedir?) that I need to think about. |
Well I would assume no since that's what globals are for? - name: some-api/hello
values:
version: 1.0-0e6884d
importantFeature: true
apiPort: 4567
|
Hmm, so you want to specify individual files inside a resource set in the context file? Why not just split them in separate resource sets then? To elaborate, kontemplate does not call kubectl on a file - it renders the templates inside the resource set and passes them to the
Not entirely sure about this, I almost always apply with |
Well it makes sense to place them under the same folder but occasionally you'll make a change to stuff-deployment.yaml but not stuff-service.yaml, and thus you only want to apply stuff-deployment. |
Okay, but in that case I assume you'd want to use the |
It is definitely useful to have support for individual files. My project is oriented per app (microservice) and I want the resource definition inside each directory. But the microservice directories also (potentially) contain lots of other JSON/YML files such as The project claims "no file naming conventions enforced at all", but there are definitely big assumptions on how the directories are structured (i.e. they must only contain resource definitions, or at least no other YML/JSON files since they cannot be excluded). This is not obvious from the documentation. |
Hello! |
The source of kontemplate is moving to git.tazj.in and I've moved this issue to the depot@tazj.in mailing list over here. |
This is allowed with regular kubectl:
These don't seem to work:
Meaning, they don't output the rendered file.
I attempted with the following
beta-cluster.yaml
:The text was updated successfully, but these errors were encountered: