From 299b2833b25de05b4a70bfea17536f45c5dd8a4d Mon Sep 17 00:00:00 2001 From: Sean Eagan Date: Tue, 15 Dec 2020 09:43:04 -0600 Subject: [PATCH] Pin krm function calls This pins krm function calls to version `v2` which represents [0] [1] the latest 2.x.x semantic version. If we need to make breaking changes to any krm functions, that can now be done by incrementing their major version and thus not breaking these references. [0]: https://review.opendev.org/c/airship/airshipctl/+/762924 [1]: https://review.opendev.org/c/airship/airshipctl/+/780875 Closes: #419 Change-Id: I6cf6519511c77da6cac7e46a6b56ea338bcf150c --- docs/source/plugins.md | 2 +- .../local-resource/example-use.yaml | 2 +- krm-functions/templater/local-resource/example-use.yaml | 2 +- .../airshipctl-base-catalogues/env-vars-template.yaml | 2 +- .../baremetal-operator/replacements/ironic-env-vars.yaml | 2 +- .../baremetal-operator/replacements/networking.yaml | 2 +- .../function/baremetal-operator/replacements/versions.yaml | 2 +- manifests/function/clusterctl/replacements/versions.yaml | 2 +- .../ephemeral/replacements/ephemeral-env-vars.yaml | 2 +- .../function/ephemeral/replacements/generated-secrets.yaml | 2 +- manifests/function/ephemeral/replacements/networking.yaml | 2 +- .../flux/helm-controller/replacements/versions.yaml | 2 +- .../flux/source-controller/replacements/env-vars.yaml | 2 +- .../flux/source-controller/replacements/versions.yaml | 2 +- manifests/function/generate-secrets-example/README.md | 2 +- .../generate-secrets-example/secret-generation.yaml | 2 +- .../hardwareprofile-example/replacements/hosts.yaml | 2 +- .../helm-operator/replacements/helm-operator-env-vars.yaml | 2 +- .../function/helm-operator/replacements/versions.yaml | 2 +- manifests/function/hostgenerator-m3/hosttemplate.yaml | 2 +- .../function/hostgenerator-m3/replacements/hosts.yaml | 2 +- manifests/function/hwcc/replacements/versions.yaml | 2 +- manifests/function/k8scontrol/replacements/cluster.yaml | 2 +- .../k8scontrol/replacements/k8scontrol-env-vars.yaml | 2 +- manifests/function/k8scontrol/replacements/networking.yaml | 2 +- manifests/function/k8scontrol/replacements/versions.yaml | 2 +- manifests/phases/executors.yaml | 2 +- manifests/site/test-site/kubeconfig/update-target.yaml | 2 +- .../results/decrypt-secrets/configurable-decryption.yaml | 2 +- .../target/workers/replacements/workers-env-vars.yaml | 2 +- .../type/gating/target/generator/secret-template.yaml | 2 +- .../target/workload/ingress/replacements/versions.yaml | 2 +- tools/deployment/update-krm-images | 7 +++++-- 33 files changed, 37 insertions(+), 34 deletions(-) diff --git a/docs/source/plugins.md b/docs/source/plugins.md index fa79427ea..08d4ddd8f 100644 --- a/docs/source/plugins.md +++ b/docs/source/plugins.md @@ -220,7 +220,7 @@ metadata: annotations: config.kubernetes.io/function: | container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 values: hosts: - macAddress: 00:aa:bb:cc:dd diff --git a/krm-functions/replacement-transformer/local-resource/example-use.yaml b/krm-functions/replacement-transformer/local-resource/example-use.yaml index 3e148d71c..c71970b69 100644 --- a/krm-functions/replacement-transformer/local-resource/example-use.yaml +++ b/krm-functions/replacement-transformer/local-resource/example-use.yaml @@ -17,7 +17,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 name: k8scontrol-versions-replacements replacements: # Replace the Kubernetes version in the KubeadmControlPlane diff --git a/krm-functions/templater/local-resource/example-use.yaml b/krm-functions/templater/local-resource/example-use.yaml index cc082407a..360e8fc82 100644 --- a/krm-functions/templater/local-resource/example-use.yaml +++ b/krm-functions/templater/local-resource/example-use.yaml @@ -15,7 +15,7 @@ metadata: annotations: config.kubernetes.io/function: | container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 values: hosts: - macAddress: 00:aa:bb:cc:dd diff --git a/manifests/function/airshipctl-base-catalogues/env-vars-template.yaml b/manifests/function/airshipctl-base-catalogues/env-vars-template.yaml index 257ac7a20..568f48496 100644 --- a/manifests/function/airshipctl-base-catalogues/env-vars-template.yaml +++ b/manifests/function/airshipctl-base-catalogues/env-vars-template.yaml @@ -7,7 +7,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 envs: - HTTP_PROXY - HTTPS_PROXY diff --git a/manifests/function/baremetal-operator/replacements/ironic-env-vars.yaml b/manifests/function/baremetal-operator/replacements/ironic-env-vars.yaml index 794d565f0..880f030ec 100644 --- a/manifests/function/baremetal-operator/replacements/ironic-env-vars.yaml +++ b/manifests/function/baremetal-operator/replacements/ironic-env-vars.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the proxy vars - source: diff --git a/manifests/function/baremetal-operator/replacements/networking.yaml b/manifests/function/baremetal-operator/replacements/networking.yaml index 7fb0d41dc..ecd0ae278 100644 --- a/manifests/function/baremetal-operator/replacements/networking.yaml +++ b/manifests/function/baremetal-operator/replacements/networking.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the pod & service networks - source: diff --git a/manifests/function/baremetal-operator/replacements/versions.yaml b/manifests/function/baremetal-operator/replacements/versions.yaml index efcb71a37..091dab14a 100644 --- a/manifests/function/baremetal-operator/replacements/versions.yaml +++ b/manifests/function/baremetal-operator/replacements/versions.yaml @@ -7,7 +7,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Container versions for the ironic Deployment - source: diff --git a/manifests/function/clusterctl/replacements/versions.yaml b/manifests/function/clusterctl/replacements/versions.yaml index 275d2184e..588c70a1a 100644 --- a/manifests/function/clusterctl/replacements/versions.yaml +++ b/manifests/function/clusterctl/replacements/versions.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace capm3 versions - source: diff --git a/manifests/function/ephemeral/replacements/ephemeral-env-vars.yaml b/manifests/function/ephemeral/replacements/ephemeral-env-vars.yaml index a8ff71eb5..3aadb81d9 100644 --- a/manifests/function/ephemeral/replacements/ephemeral-env-vars.yaml +++ b/manifests/function/ephemeral/replacements/ephemeral-env-vars.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the proxy vars - source: diff --git a/manifests/function/ephemeral/replacements/generated-secrets.yaml b/manifests/function/ephemeral/replacements/generated-secrets.yaml index 6b4ee3515..d3d8d6507 100644 --- a/manifests/function/ephemeral/replacements/generated-secrets.yaml +++ b/manifests/function/ephemeral/replacements/generated-secrets.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/ephemeral/replacements/networking.yaml b/manifests/function/ephemeral/replacements/networking.yaml index be6cac4f9..8f2539c1a 100644 --- a/manifests/function/ephemeral/replacements/networking.yaml +++ b/manifests/function/ephemeral/replacements/networking.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Substring-replace the ephemeral control plane's info - source: diff --git a/manifests/function/flux/helm-controller/replacements/versions.yaml b/manifests/function/flux/helm-controller/replacements/versions.yaml index fba48fc27..ba0b3ceea 100644 --- a/manifests/function/flux/helm-controller/replacements/versions.yaml +++ b/manifests/function/flux/helm-controller/replacements/versions.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/flux/source-controller/replacements/env-vars.yaml b/manifests/function/flux/source-controller/replacements/env-vars.yaml index e4abc6a3e..6fb9a8e00 100644 --- a/manifests/function/flux/source-controller/replacements/env-vars.yaml +++ b/manifests/function/flux/source-controller/replacements/env-vars.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the proxy vars - source: diff --git a/manifests/function/flux/source-controller/replacements/versions.yaml b/manifests/function/flux/source-controller/replacements/versions.yaml index 1a836b0a3..ed374eb3d 100644 --- a/manifests/function/flux/source-controller/replacements/versions.yaml +++ b/manifests/function/flux/source-controller/replacements/versions.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/generate-secrets-example/README.md b/manifests/function/generate-secrets-example/README.md index 98312274f..4120cc171 100644 --- a/manifests/function/generate-secrets-example/README.md +++ b/manifests/function/generate-secrets-example/README.md @@ -101,7 +101,7 @@ metadata: kustomizeSinkOutputDir: "target/generator/results/generated" spec: container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 config: | foo: bar ``` diff --git a/manifests/function/generate-secrets-example/secret-generation.yaml b/manifests/function/generate-secrets-example/secret-generation.yaml index 5c176f2bf..aa547d7c6 100644 --- a/manifests/function/generate-secrets-example/secret-generation.yaml +++ b/manifests/function/generate-secrets-example/secret-generation.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: | container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 values: clusterCa: cn: "Kubernetes API" diff --git a/manifests/function/hardwareprofile-example/replacements/hosts.yaml b/manifests/function/hardwareprofile-example/replacements/hosts.yaml index 974f10bad..3b61d1465 100644 --- a/manifests/function/hardwareprofile-example/replacements/hosts.yaml +++ b/manifests/function/hardwareprofile-example/replacements/hosts.yaml @@ -8,7 +8,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml b/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml index 7c972dd81..ab0ee78f8 100644 --- a/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml +++ b/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the proxy vars - source: diff --git a/manifests/function/helm-operator/replacements/versions.yaml b/manifests/function/helm-operator/replacements/versions.yaml index f9730ea5e..142e7dcc3 100644 --- a/manifests/function/helm-operator/replacements/versions.yaml +++ b/manifests/function/helm-operator/replacements/versions.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/hostgenerator-m3/hosttemplate.yaml b/manifests/function/hostgenerator-m3/hosttemplate.yaml index 5a51853e9..278913db7 100644 --- a/manifests/function/hostgenerator-m3/hosttemplate.yaml +++ b/manifests/function/hostgenerator-m3/hosttemplate.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 values: # hosts: diff --git a/manifests/function/hostgenerator-m3/replacements/hosts.yaml b/manifests/function/hostgenerator-m3/replacements/hosts.yaml index 24ce77325..4f13d219f 100644 --- a/manifests/function/hostgenerator-m3/replacements/hosts.yaml +++ b/manifests/function/hostgenerator-m3/replacements/hosts.yaml @@ -7,7 +7,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/hwcc/replacements/versions.yaml b/manifests/function/hwcc/replacements/versions.yaml index 40880b84f..08480a82f 100644 --- a/manifests/function/hwcc/replacements/versions.yaml +++ b/manifests/function/hwcc/replacements/versions.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/k8scontrol/replacements/cluster.yaml b/manifests/function/k8scontrol/replacements/cluster.yaml index fdd9d3080..a1d99ed6c 100644 --- a/manifests/function/k8scontrol/replacements/cluster.yaml +++ b/manifests/function/k8scontrol/replacements/cluster.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/function/k8scontrol/replacements/k8scontrol-env-vars.yaml b/manifests/function/k8scontrol/replacements/k8scontrol-env-vars.yaml index b9445faa7..1978b149d 100644 --- a/manifests/function/k8scontrol/replacements/k8scontrol-env-vars.yaml +++ b/manifests/function/k8scontrol/replacements/k8scontrol-env-vars.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the proxy vars - source: diff --git a/manifests/function/k8scontrol/replacements/networking.yaml b/manifests/function/k8scontrol/replacements/networking.yaml index b0fba381e..10e02a86c 100644 --- a/manifests/function/k8scontrol/replacements/networking.yaml +++ b/manifests/function/k8scontrol/replacements/networking.yaml @@ -11,7 +11,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the pod & service networks - source: diff --git a/manifests/function/k8scontrol/replacements/versions.yaml b/manifests/function/k8scontrol/replacements/versions.yaml index 2cdde8e71..3d9d47341 100644 --- a/manifests/function/k8scontrol/replacements/versions.yaml +++ b/manifests/function/k8scontrol/replacements/versions.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the Kubernetes version in the KubeadmControlPlane - source: diff --git a/manifests/phases/executors.yaml b/manifests/phases/executors.yaml index 6be16cac7..b97da5ab1 100644 --- a/manifests/phases/executors.yaml +++ b/manifests/phases/executors.yaml @@ -179,7 +179,7 @@ metadata: airshipit.org/deploy-k8s: "false" spec: type: krm - image: quay.io/airshipit/cloud-init:latest + image: quay.io/airshipit/cloud-init:v2 mounts: - type: bind src: /srv/images diff --git a/manifests/site/test-site/kubeconfig/update-target.yaml b/manifests/site/test-site/kubeconfig/update-target.yaml index c0da036a8..3af7f8d78 100644 --- a/manifests/site/test-site/kubeconfig/update-target.yaml +++ b/manifests/site/test-site/kubeconfig/update-target.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/manifests/site/test-site/target/generator/results/decrypt-secrets/configurable-decryption.yaml b/manifests/site/test-site/target/generator/results/decrypt-secrets/configurable-decryption.yaml index c6b8f6b15..8cae7aeca 100644 --- a/manifests/site/test-site/target/generator/results/decrypt-secrets/configurable-decryption.yaml +++ b/manifests/site/test-site/target/generator/results/decrypt-secrets/configurable-decryption.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: | container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 envs: - TOLERATE_DECRYPTION_FAILURES template: | diff --git a/manifests/site/test-site/target/workers/replacements/workers-env-vars.yaml b/manifests/site/test-site/target/workers/replacements/workers-env-vars.yaml index ad79874ab..3d90acfd6 100644 --- a/manifests/site/test-site/target/workers/replacements/workers-env-vars.yaml +++ b/manifests/site/test-site/target/workers/replacements/workers-env-vars.yaml @@ -6,7 +6,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: # Replace the proxy vars - source: diff --git a/manifests/type/gating/target/generator/secret-template.yaml b/manifests/type/gating/target/generator/secret-template.yaml index 137b0cfb0..ef7eaff15 100644 --- a/manifests/type/gating/target/generator/secret-template.yaml +++ b/manifests/type/gating/target/generator/secret-template.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: | container: - image: quay.io/airshipit/templater:latest + image: quay.io/airshipit/templater:v2 values: ephemeralCluster: ca: diff --git a/manifests/type/gating/target/workload/ingress/replacements/versions.yaml b/manifests/type/gating/target/workload/ingress/replacements/versions.yaml index 979d46a18..473a4b78b 100644 --- a/manifests/type/gating/target/workload/ingress/replacements/versions.yaml +++ b/manifests/type/gating/target/workload/ingress/replacements/versions.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/function: |- container: - image: quay.io/airshipit/replacement-transformer:latest + image: quay.io/airshipit/replacement-transformer:v2 replacements: - source: objref: diff --git a/tools/deployment/update-krm-images b/tools/deployment/update-krm-images index 3925f4a60..1830fa9f2 100755 --- a/tools/deployment/update-krm-images +++ b/tools/deployment/update-krm-images @@ -21,14 +21,17 @@ set -xe export MANIFEST_DIR=${MANIFEST_DIR:-"$(pwd)"} -export OLD_REPLACEMENT_TRANSFORMER=${OLD_REPLACEMENT_TRANSFORMER:-"quay.io/airshipit/replacement-transformer:latest"} -export OLD_TEMPLATER=${OLD_TEMPLATER:-"quay.io/airshipit/templater:latest"} +export OLD_REPLACEMENT_TRANSFORMER=${OLD_REPLACEMENT_TRANSFORMER:-"quay.io/airshipit/replacement-transformer:v2"} +export OLD_TEMPLATER=${OLD_TEMPLATER:-"quay.io/airshipit/templater:v2"} +export OLD_CLOUD_INIT=${OLD_CLOUD_INIT:-"quay.io/airshipit/cloud-init:v2"} export OLD_SOPS=${OLD_SOPS:-"quay.io/aodinokov/sops:v0.0.3"} export NEW_REPLACEMENT_TRANSFORMER=${NEW_REPLACEMENT_TRANSFORMER:-$OLD_REPLACEMENT_TRANSFORMER} export NEW_TEMPLATER=${NEW_TEMPLATER:-$OLD_TEMPLATER} +export NEW_CLOUD_INIT=${NEW_CLOUD_INIT:-$OLD_CLOUD_INIT} export NEW_SOPS=${NEW_SOPS:-$OLD_SOPS} find "$MANIFEST_DIR" -type f -exec sed -i -e "s#$OLD_REPLACEMENT_TRANSFORMER#$NEW_REPLACEMENT_TRANSFORMER#g" {} \; find "$MANIFEST_DIR" -type f -exec sed -i -e "s#$OLD_TEMPLATER#$NEW_TEMPLATER#g" {} \; +find "$MANIFEST_DIR" -type f -exec sed -i -e "s#$OLD_CLOUD_INIT#$NEW_CLOUD_INIT#g" {} \; find "$MANIFEST_DIR" -type f -exec sed -i -e "s#$OLD_SOPS#$NEW_SOPS#g" {} \;