Skip to content
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
12 tasks
bprashanth opened this issue Apr 6, 2016 · 33 comments
Closed
12 tasks

Implement templates #23896

bprashanth opened this issue Apr 6, 2016 · 33 comments
Labels
area/app-lifecycle area/declarative-configuration priority/backlog Higher priority than priority/awaiting-more-evidence. sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog.

Comments

@bprashanth
Copy link
Contributor

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.

@bprashanth bprashanth added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. team/ux labels Apr 6, 2016
@bgrant0607 bgrant0607 added this to the v1.3 milestone Apr 6, 2016
@bgrant0607
Copy link
Member

cc @pwittrock @janetkuo

@bgrant0607 bgrant0607 added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Apr 6, 2016
@0xmichalis
Copy link
Contributor

cc @mfojtik

@soltysh
Copy link
Contributor

soltysh commented Apr 6, 2016

/cc @bparees

@bgrant0607
Copy link
Member

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

@bgrant0607 bgrant0607 removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Apr 8, 2016
@bgrant0607
Copy link
Member

@bgrant0607
Copy link
Member

ref #25293, #25622

@bgrant0607 bgrant0607 added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. area/app-lifecycle labels Jul 20, 2016
@soltysh
Copy link
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
Copy link
Contributor

I'll create one.

@smarterclayton
Copy link
Contributor

kubernetes/enhancements#35

@bgrant0607 bgrant0607 changed the title Implement templating Implement templates Jul 20, 2016
@bgrant0607
Copy link
Member

@danielqsj offered to help.

cc @pwittrock @smarterclayton @bparees

@pwittrock
Copy link
Member

Does that mean we have review bandwidth?

@bparees
Copy link
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
Copy link
Member

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 berkeley-dsep-infra/jupyterhub-k8s that referenced this issue Nov 6, 2016
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 berkeley-dsep-infra/jupyterhub-k8s that referenced this issue Nov 6, 2016
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.
@bgrant0607
Copy link
Member

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

@pwittrock pwittrock self-assigned this Jan 5, 2017
@roberthbailey roberthbailey removed the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Apr 25, 2017
@evictor
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
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.

jetstack-ci-bot added a commit to jetstack/navigator that referenced this issue Jan 8, 2018
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
Copy link

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
Copy link
Member

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.
Labels
area/app-lifecycle area/declarative-configuration priority/backlog Higher priority than priority/awaiting-more-evidence. sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog.
Projects
None yet
Development

No branches or pull requests