Comments (6)
A few notes:
We will probably stick with ERB after all@camilo still feels quite strongly about this. How about Liquid? Camilo has reluctantly stated that he doesn't have any good arguments against it. 😛- We need to re-survey the state of the community tooling and opinion on this before implementing anything. Relevant:
- Whitebox COTS application management (need to join sig-apps google group for access)
- Templates design proposal (notably argues against partials)
- Rust prototype based on that proposal
- PodTemplate may eventually become independently usable: issue1, issue2
cc @xldenis
from krane.
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.
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.
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.
I have submitted a PR for a rather simple partials implementation which would nonetheless fulfill our needs. See #207
from krane.
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 tokubectl 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)
- Krane failing with the latest ubuntu version on github actions HOT 1
- uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState HOT 6
- Ensure deploy tasks fail without at least one non-empty resourc
- unable to recognize "/yaml Path": no matches for kind "EnvoyFilter" in version "networking.istio.io/v1beta1
- Wrong CRD may be referenced by Custom Resource with duplicate Kind HOT 1
- Wrong CRD may be referenced by Custom Resource in global_deploy
- Deployment with Gitlab-Agent/KAS fails
- Error retrieving raw URIs from Rancher / Proxied-APIs HOT 3
- krane restart hits testing code path and silently fails HOT 3
- Krane is unable to fully deploy resources when there are duplicate Kinds
- Terrible performance HOT 1
- option to predeploy any resource HOT 3
- Stop pruning `Event` resources on deploy.
- Add support for `OnDelete` update strategy when checking for a successful deploy HOT 5
- Piping render to deploy command is potentially dangerous HOT 1
- Option to hard-fail when current_sha is empty
- kubectl 1.26 flag changes
- Krane 3.0.1 does not work on Kubernetes 1.25 for HPA resources
- Can the dependency on colorize be updated to use the new 1.x versions from 2023 (and no longer the 0.8 versions from 2016)?
- Error during install
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 krane.