Closed kvaps closed 7 months ago
As part of #109
containers and volumes specified in a template should be merged using strategic merge patch, for example:
containers
volumes
template
apiVersion: etcd.aenix.io/v1alpha1 kind: EtcdCluster metadata: name: test namespace: default spec: replicas: 3 options: # map[string]string arg1: "value1" arg2: "value2" podTemplate: spec: containers: # []v1.Container - name: etcd volumeMounts: - name: test mountPath: /data/demo - name: exporter image: alpine args: - sleep - infinity volumeMounts: - name: test mountPath: /data/demo volumes: # []v1.Volume - name: test emptyDir: {}
should create a Pod with two containers: etcd and exporter and the same volume shared between them
etcd
exporter
Internally agreed to merge podTemplate as lower level and generated object as upper layer. Currently it looks like more safe design. We can always change this behavior later.
As part of #109
containers
andvolumes
specified in atemplate
should be merged using strategic merge patch, for example:should create a Pod with two containers:
etcd
andexporter
and the same volume shared between them