Giter VIP home page Giter VIP logo

Comments (6)

KnVerey avatar KnVerey commented on August 28, 2024

A few notes:

cc @xldenis

from krane.

errordeveloper avatar errordeveloper commented on August 28, 2024

Have you seen my kubegen project? Lately, I've been playing around with some ideas around a macro syntax that would be native to YAML/JSON (somewhat alike CloudFormation), happy to chat more. I feel like plain text templating engines make the whole problem much more complex at times, and don't really guarantee valid output.

from krane.

KnVerey avatar KnVerey commented on August 28, 2024

Hi @errordeveloper! I did check out your project at some point and it looks pretty cool. 😄 I've also got my eye on the ksonnet project's solution to this problem. Shopify is still using regular yamls for the time being, but we're actively exploring other options. As far as kubernetes-deploy is concerned, I'm currently thinking we'll either expect users to generate regular k8s defs with the tool of their choice before invoking it or at most add some sort of preprocessing plug-ins hooks. Making it super opinionated about a proprietary template format seems like the wrong way to go.

from krane.

skaes avatar skaes commented on August 28, 2024

The main pain point for us are cronjobs. One of our teams has 20 of them. Just writing them down is an ordeal. Keeping them consistent after changes, for example in env variables, is a nightmare. I would love to have partials to solve this problem.

from krane.

skaes avatar skaes commented on August 28, 2024

I have submitted a PR for a rather simple partials implementation which would nonetheless fulfill our needs. See #207

from krane.

KnVerey avatar KnVerey commented on August 28, 2024

After giving this further thought, this is what I think we should do:

  • extract our existing renderer into a separate class, and additionally expose it via a separate command (per #228)
  • add partial support to the renderer (per #207)
  • accept fully rendered templates from $stdin as an alternative to a template directory (like the -f option to kubectl apply)
  • When we hit v1.0 (#229), disable ERB rendering in the deploy command by default (either add a flag to trigger it or require piping the output of the rendering command)

This gem's purpose is to be a deploy tool, not a templating engine. Basic ERB rendering is great for convenience, and we should keep it available in some form. However, there are many better community tools available for k8s templating, and our focus should be on cross-compatibility with those.

from krane.

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.