Comments (8)
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.
from kontemplate.
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
some-api/lala
would not inherit variables from some-api/hello
. I do think this feature is needed since kubectl allows it. I also think kubectl replace is idempotent when you write over with the same config unless you do add the --force label, then it deletes and adds the new resource.
from kontemplate.
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 stdin
of kubectl.
I also think kubectl replace is idempotent when you write over with the same config
Not entirely sure about this, I almost always apply with apply
because that will normally do the correct thing :-)
from kontemplate.
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?
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.
from kontemplate.
Okay, but in that case I assume you'd want to use the --include
| --exclude
flags on the CLI as a one-off, rather than specifying that specific file in the cluster context?
from kontemplate.
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 package.json
. This is now presumed to be a resource definition but there appears to be absolutely no way around this. I cannot exclude any files, and I cannot selectively include specific files.
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.
from kontemplate.
Hello!
Any update on this?
from kontemplate.
The source of kontemplate is moving to git.tazj.in and I've moved this issue to the [email protected] mailing list over here.
from kontemplate.
Related Issues (20)
- Interpolating yaml as a template variables HOT 1
- Kubectl errors not revealed by kontemplate apply HOT 3
- insertFile parameteres or function HOT 2
- Templating for global variables HOT 7
- Add change cause for "Kontemplate apply" HOT 2
- Version 1.6 values vs global HOT 22
- Allow specifying the kubectl executable HOT 4
- [Feature] Ability to exclude some resources (or files) from template processing HOT 5
- kontemplate create does not send everything to kubectl HOT 3
- allow passing variables from command line HOT 1
- Not able to use all sprig functions HOT 4
- 1.6 global settings work differently from 1.5 global settings HOT 2
- Can't access sub-values in the new default function HOT 5
- A way to apply config with options (--as-admin, --as-group) HOT 2
- Override nested variables HOT 3
- Ability to resuse the template vairable within the master template and k8s resources HOT 1
- Please make a new release HOT 2
- Help me to beat my issue HOT 1
- Add support for null checks HOT 1
- Wrong term in cluster config
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kontemplate.