GoogleCloudPlatform/k8s-cluster-bundle

Add Template to ComponentBuilder

Closed this issue · 2 comments

Today, the ComponentBuilder looks something like:

https://github.com/GoogleCloudPlatform/k8s-cluster-bundle/blob/master/examples/component/etcd-component-builder.yaml

apiVersion: bundle.gke.io/v1alpha1
kind: ComponentBuilder
componentName: etcd-component
version: 30.0.2
objectFiles:
- url: template-builder.yaml

and then the template-builder will reference via

apiVersion: bundle.gke.io/v1alpha1
kind: ObjectTemplateBuilder
file:
- url: etcd-template.yaml

This is a silly amount of boiler plate. It would be nice to reduce this into the component builder:

apiVersion: bundle.gke.io/v1alpha1
kind: ComponentBuilder
componentName: etcd-component
version: 30.0.2
objectFiles:
- url: some-non-templated-file.yaml
templateFiles:
- url: etcd-template

Much cleaner

This would require:

@Kashomon Do we want to maintain backwards compatibility?