Add additional versions replacements

This adds catalogue-based version replacement to the following
functions, which were added since version replacement was
introduced:
- calico (consumed via the infra composite)
- helm-operator
- hwcc (not actually used in any site definitions yet)

Change-Id: If4d6b9f64d7f170ddf0d79455cfd3cfce260f128
changes/72/755672/2
Matt McEuen 2 years ago
parent 76e4d3f48c
commit 128a2e5e3f
  1. 4
      manifests/composite/infra/replacements/kustomization.yaml
  2. 15
      manifests/function/airshipctl-catalogues/versions-airshipctl.yaml
  3. 4
      manifests/function/cni/calico/v3/replacements/kustomization.yaml
  4. 56
      manifests/function/cni/calico/v3/replacements/versions.yaml
  5. 4
      manifests/function/helm-operator/replacements/kustomization.yaml
  6. 16
      manifests/function/helm-operator/replacements/versions.yaml
  7. 4
      manifests/function/hwcc/replacements/kustomization.yaml
  8. 26
      manifests/function/hwcc/replacements/versions.yaml
  9. 1
      manifests/site/test-site/ephemeral/initinfra/kustomization.yaml
  10. 2
      manifests/site/test-site/target/initinfra/kustomization.yaml

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../function/cni/calico/v3/replacements

@ -45,5 +45,20 @@ images:
baremetal_operator: quay.io/metal3-io/baremetal-operator:capm3-v0.4.0
ironic_proxy: alpine/socat
ironic_inspector_proxy: alpine/socat
calico_v3:
node: # calico-node DaemonSet
upgrade_ipam: calico/cni:v3.15.1
install_cni: calico/cni:v3.15.1
flexvol_driver: calico/pod2daemon-flexvol:v3.15.1
calico_node: calico/node:v3.15.1
kube_controllers: # calico-kube-controllers Deployment
calico_kube_controllers: calico/kube-controllers:v3.15.1
hwcc:
manager: # controller-manager Deployment
manager: quay.io/hwcc/airship-hcc:v1
kube_rbac_proxy: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
helm_operator:
helm_operator: # helm-operator Deployment
helm_operator: docker.io/fluxcd/helm-operator:1.2.0
kubernetes: v1.18.6

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- versions.yaml

@ -0,0 +1,56 @@
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: calico-v3-versions-replacements
replacements:
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.calico_v3.node.upgrade_ipam
target:
objref:
kind: DaemonSet
name: calico-node
fieldrefs: ["spec.template.spec.initContainers[name=upgrade-ipam].image"]
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.calico_v3.node.install_cni
target:
objref:
kind: DaemonSet
name: calico-node
fieldrefs: ["spec.template.spec.initContainers[name=install-cni].image"]
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.calico_v3.node.flexvol_driver
target:
objref:
kind: DaemonSet
name: calico-node
fieldrefs: ["spec.template.spec.initContainers[name=flexvol-driver].image"]
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.calico_v3.node.calico_node
target:
objref:
kind: DaemonSet
name: calico-node
fieldrefs: ["spec.template.spec.containers[name=calico-node].image"]
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.calico_v3.kube_controllers.calico_kube_controllers
target:
objref:
kind: Deployment
name: calico-kube-controllers
fieldrefs: ["spec.template.spec.containers[name=calico-kube-controllers].image"]

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- versions.yaml

@ -0,0 +1,16 @@
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: helm-operator-versions-replacements
replacements:
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.helm_operator.helm_operator.helm_operator
target:
objref:
kind: Deployment
name: helm-operator
fieldrefs: ["spec.template.spec.containers[name=helm-operator].image"]

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- versions.yaml

@ -0,0 +1,26 @@
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: hwcc-versions-replacements
replacements:
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.hwcc.manager.manager
target:
objref:
kind: Deployment
name: controller-manager
fieldrefs: ["spec.template.spec.containers[name=manager].image"]
- source:
objref:
kind: VariableCatalogue
name: versions-airshipctl
fieldref: images.hwcc.manager.kube_rbac_proxy
target:
objref:
kind: Deployment
name: controller-manager
fieldrefs: ["spec.template.spec.containers[name=kube-rbac-proxy].image"]

@ -14,4 +14,5 @@ generators:
- ../../../../function/airshipctl-catalogues
transformers:
- ../../../../composite/infra/replacements
- ../../../../function/baremetal-operator/replacements

@ -15,4 +15,6 @@ generators:
- ../../../../function/airshipctl-catalogues
transformers:
- ../../../../composite/infra/replacements
- ../../../../function/baremetal-operator/replacements
- ../../../../function/helm-operator/replacements

Loading…
Cancel
Save