Add Template to ComponentBuilder
Closed this issue · 2 comments
artasparks commented
Today, the ComponentBuilder looks something like:
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
artasparks commented
This would require:
-
Changing the builder type: https://github.com/GoogleCloudPlatform/k8s-cluster-bundle/blob/master/pkg/apis/bundle/v1alpha1/builder_types.go. We would probably not want to add the open API schema for now.
-
Changing the inlining logic: https://github.com/GoogleCloudPlatform/k8s-cluster-bundle/blob/master/pkg/build/inline.go#L143
nicolexin commented
@Kashomon Do we want to maintain backwards compatibility?