New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement templates #23896

Closed
bprashanth opened this Issue Apr 6, 2016 · 33 comments

Comments

Projects
None yet
@bprashanth
Member

bprashanth commented Apr 6, 2016

Tracks the implementation of the templating proposal: https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/templates.md.

This wip is essentially a quick merge of os templates with HEAD + some modifications to get the core substitution logic and resource to work with apiserver: #23895

See proposal for details on what remains, from memory:

  • (()) syntax
  • /processedTemplates and /templates api endpoints
  • pkg/client
  • kubectl integration
  • validation
  • Unittests for templates, etcd etc
  • e2es
  • docs

Other items to track

  • Template processing
  • Template create validation + etcd_test.go tests
  • Template update validation + etcd_test.go tests
  • Processing templates without saving them

@bgrant0607 mentioned someone from @kubernetes/kubectl might be interested.
@bparees since you had the original proposal.

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Apr 6, 2016

@kargakis

This comment has been minimized.

Member

kargakis commented Apr 6, 2016

@soltysh

This comment has been minimized.

Contributor

soltysh commented Apr 6, 2016

/cc @bparees

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Apr 8, 2016

An implementation in Rust:
https://github.com/InQuicker/ktmpl

@bgrant0607

This comment has been minimized.

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Jul 19, 2016

ref #25293, #25622

@soltysh

This comment has been minimized.

Contributor

soltysh commented Jul 20, 2016

Can we have a template feature in https://github.com/kubernetes/features as an umbrella for the ongoing implementations?

@smarterclayton

This comment has been minimized.

Contributor

smarterclayton commented Jul 20, 2016

I'll create one.

@smarterclayton

This comment has been minimized.

Contributor

smarterclayton commented Jul 20, 2016

@bgrant0607 bgrant0607 changed the title from Implement templating to Implement templates Jul 20, 2016

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Jul 20, 2016

@pwittrock

This comment has been minimized.

Member

pwittrock commented Jul 21, 2016

Does that mean we have review bandwidth?

@bparees

This comment has been minimized.

Contributor

bparees commented Jul 21, 2016

I have review bandwidth, though my review perspective is largely limited to the original proposal intent and what was done in openshift, not so much "is this how we want it to be integrated into k8s"

@pwittrock

This comment has been minimized.

Member

pwittrock commented Jul 21, 2016

SGTM. Let me sync up with Brian on our goals. A good chunk of Templates is implemented. Would like to get feedback on some changes I made to the original proposal.

SamLau95 added a commit to data-8/jupyterhub-k8s that referenced this issue Nov 6, 2016

Allow building and pushing images on another branch
Before, all images are pushed with the SHA and the `latest` tag.

With this commit, pushing an image will tag it with the branch name as
well for easier use while developing.

Unfortunately, k8s doesn't support templating yet
(kubernetes/kubernetes#23896) so you'll still
have to manually change the image tag in the `manifest.yaml` file back
and forth but it's definitely easier than before.

Now, the workflow is:

1. Work on image
2. Push with `make release-all`
3. Edit `manifest.yaml` to use images for your branch to test
4. Edit it back when making a PR.

SamLau95 added a commit to data-8/jupyterhub-k8s that referenced this issue Nov 6, 2016

Allow building and pushing images on another branch
Before, all images are pushed with the SHA and the `latest` tag.

With this commit, pushing an image will tag it with the branch name as
well for easier use while developing.

Unfortunately, k8s doesn't support templating yet
(kubernetes/kubernetes#23896) so you'll still
have to manually change the image tag in the `manifest.yaml` file back
and forth but it's definitely easier than before.

Now, the workflow is:

1. Work on image
2. Push with `make release-all`
3. Edit `manifest.yaml` to use images for your branch to test
4. Edit it back when making a PR.

@alexsparrow alexsparrow referenced this issue Nov 9, 2016

Merged

Kubernetes #10

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Dec 8, 2016

Independent implementation:
https://github.com/InQuicker/ktmpl

@evictor

This comment has been minimized.

evictor commented May 23, 2017

When do you suppose this will come to fruition? I'm having to jerry rig Yaml file parametrization using some other bash str sub tool.

@tazjin

This comment has been minimized.

tazjin commented May 23, 2017

@evictor I don't think a lot of work is being done on this, in favour of third-party tools.

The "big" one is Helm, but it comes with a lot of added complexity (but also a lot of pre-packaged "charts").

If you're looking for something simpler (templating with a notion of different environments/clusters), take a look at kontemplate.

@evictor

This comment has been minimized.

evictor commented May 23, 2017

Thanks for the pointers. Kontemplate looks good. For POC purposes I am using envsubst which is just a very simple command line tool.

@rot26

This comment has been minimized.

rot26 commented May 26, 2017

@evictor I did not get envsubst working on mac. I started using good ol' sed until I googled my way to sigil for text replace. (good features, not specific to kubernetes)
After I set everything up with sigil, I discovered helm. I will start with helm next time for kubernetes.

@evictor

This comment has been minimized.

evictor commented May 26, 2017

@rot26 I was able to install it relatively painlessly using brew install gettext, then bringing envsubst binary into PATH; I found envsubst binary in /usr/local/Cellar/gettext/0.19.8.1/bin.

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Jul 6, 2017

There are many, many tools that can do parameter substitution and other forms of config generation:
Helm
OC new-app
Kompose
Spread
Draft
Ksonnet/Kubecfg
Konfd
Templates/Ktmpl
Fabric8 client
Kubegen
kenv
Ansible
Puppet
KPM
Nulecule
OpenCompose / kedge
Chartify
Podex
k8sec
Kploy
kb80r
k8s-kotlin-dsl
KY
kdeploy
K8comp
Kontemplate
kexpand
Forge
Deploymentizer
Broadway
srvexpand

(links will go elsewhere)

For now, the client-side implementation exists.

@bgrant0607 bgrant0607 closed this Jul 6, 2017

jetstack-ci-bot added a commit to jetstack/navigator that referenced this issue Jan 8, 2018

Merge pull request #179 from wallrj/parameterise-es-yaml
Automatic merge from submit-queue.

Parameterise ES cluster yaml in tests

Allows me to override the ES pilot image parameters when I'm running tests manually on GKE.

Using `envsubst` as a much lighter weight alternative to using helm chart. Discovered via: kubernetes/kubernetes#23896 (comment)


Stacked on #177 

**Release note**:
```release-note
NONE
```

@kubernetes kubernetes deleted a comment from sleaze Jan 30, 2018

@greg-jaunt

This comment has been minimized.

greg-jaunt commented Feb 5, 2018

Deleted snarky comments aside, we use Kubernetes because it is an opinionated framework. Kubernetes is able to grow so quickly because there is one good implementation of every needed feature for the rest of the Kubernetes community to build on. IMO, it doesn't make sense for Kubernetes to be opinionated about everything except templating.

@bgrant0607

This comment has been minimized.

Member

bgrant0607 commented Feb 5, 2018

I suggest that people interested in helping with this topic participate in the Application Definition Working Group:

https://github.com/kubernetes/community/tree/master/wg-app-def

@kubernetes kubernetes locked and limited conversation to collaborators Feb 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.