Giter Club home page Giter Club logo

Comments (8)

tazjin avatar tazjin commented on May 28, 2024

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.

alajmo avatar alajmo commented on May 28, 2024

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.

tazjin avatar tazjin commented on May 28, 2024

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.

alajmo avatar alajmo commented on May 28, 2024

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.

tazjin avatar tazjin commented on May 28, 2024

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.

rolftimmermans avatar rolftimmermans commented on May 28, 2024

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.

rakshazi avatar rakshazi commented on May 28, 2024

Hello!
Any update on this?

from kontemplate.

tazjin avatar tazjin commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.