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
This commit is contained in:
Sean Eagan 2020-12-15 09:43:04 -06:00
parent 442f9965fb
commit 299b2833b2
33 changed files with 37 additions and 34 deletions

View File

@ -220,7 +220,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: | config.kubernetes.io/function: |
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
values: values:
hosts: hosts:
- macAddress: 00:aa:bb:cc:dd - macAddress: 00:aa:bb:cc:dd

View File

@ -17,7 +17,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
name: k8scontrol-versions-replacements name: k8scontrol-versions-replacements
replacements: replacements:
# Replace the Kubernetes version in the KubeadmControlPlane # Replace the Kubernetes version in the KubeadmControlPlane

View File

@ -15,7 +15,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: | config.kubernetes.io/function: |
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
values: values:
hosts: hosts:
- macAddress: 00:aa:bb:cc:dd - macAddress: 00:aa:bb:cc:dd

View File

@ -7,7 +7,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
envs: envs:
- HTTP_PROXY - HTTP_PROXY
- HTTPS_PROXY - HTTPS_PROXY

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the proxy vars # Replace the proxy vars
- source: - source:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the pod & service networks # Replace the pod & service networks
- source: - source:

View File

@ -7,7 +7,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Container versions for the ironic Deployment # Container versions for the ironic Deployment
- source: - source:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace capm3 versions # Replace capm3 versions
- source: - source:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the proxy vars # Replace the proxy vars
- source: - source:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Substring-replace the ephemeral control plane's info # Substring-replace the ephemeral control plane's info
- source: - source:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the proxy vars # Replace the proxy vars
- source: - source:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -101,7 +101,7 @@ metadata:
kustomizeSinkOutputDir: "target/generator/results/generated" kustomizeSinkOutputDir: "target/generator/results/generated"
spec: spec:
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
config: | config: |
foo: bar foo: bar
``` ```

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: | config.kubernetes.io/function: |
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
values: values:
clusterCa: clusterCa:
cn: "Kubernetes API" cn: "Kubernetes API"

View File

@ -8,7 +8,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the proxy vars # Replace the proxy vars
- source: - source:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
values: values:
# hosts: # hosts:

View File

@ -7,7 +7,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the proxy vars # Replace the proxy vars
- source: - source:

View File

@ -11,7 +11,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the pod & service networks # Replace the pod & service networks
- source: - source:

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the Kubernetes version in the KubeadmControlPlane # Replace the Kubernetes version in the KubeadmControlPlane
- source: - source:

View File

@ -179,7 +179,7 @@ metadata:
airshipit.org/deploy-k8s: "false" airshipit.org/deploy-k8s: "false"
spec: spec:
type: krm type: krm
image: quay.io/airshipit/cloud-init:latest image: quay.io/airshipit/cloud-init:v2
mounts: mounts:
- type: bind - type: bind
src: /srv/images src: /srv/images

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: | config.kubernetes.io/function: |
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
envs: envs:
- TOLERATE_DECRYPTION_FAILURES - TOLERATE_DECRYPTION_FAILURES
template: | template: |

View File

@ -6,7 +6,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
# Replace the proxy vars # Replace the proxy vars
- source: - source:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: | config.kubernetes.io/function: |
container: container:
image: quay.io/airshipit/templater:latest image: quay.io/airshipit/templater:v2
values: values:
ephemeralCluster: ephemeralCluster:
ca: ca:

View File

@ -5,7 +5,7 @@ metadata:
annotations: annotations:
config.kubernetes.io/function: |- config.kubernetes.io/function: |-
container: container:
image: quay.io/airshipit/replacement-transformer:latest image: quay.io/airshipit/replacement-transformer:v2
replacements: replacements:
- source: - source:
objref: objref:

View File

@ -21,14 +21,17 @@ set -xe
export MANIFEST_DIR=${MANIFEST_DIR:-"$(pwd)"} export MANIFEST_DIR=${MANIFEST_DIR:-"$(pwd)"}
export OLD_REPLACEMENT_TRANSFORMER=${OLD_REPLACEMENT_TRANSFORMER:-"quay.io/airshipit/replacement-transformer:latest"} export OLD_REPLACEMENT_TRANSFORMER=${OLD_REPLACEMENT_TRANSFORMER:-"quay.io/airshipit/replacement-transformer:v2"}
export OLD_TEMPLATER=${OLD_TEMPLATER:-"quay.io/airshipit/templater:latest"} 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 OLD_SOPS=${OLD_SOPS:-"quay.io/aodinokov/sops:v0.0.3"}
export NEW_REPLACEMENT_TRANSFORMER=${NEW_REPLACEMENT_TRANSFORMER:-$OLD_REPLACEMENT_TRANSFORMER} export NEW_REPLACEMENT_TRANSFORMER=${NEW_REPLACEMENT_TRANSFORMER:-$OLD_REPLACEMENT_TRANSFORMER}
export NEW_TEMPLATER=${NEW_TEMPLATER:-$OLD_TEMPLATER} export NEW_TEMPLATER=${NEW_TEMPLATER:-$OLD_TEMPLATER}
export NEW_CLOUD_INIT=${NEW_CLOUD_INIT:-$OLD_CLOUD_INIT}
export NEW_SOPS=${NEW_SOPS:-$OLD_SOPS} 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_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_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" {} \; find "$MANIFEST_DIR" -type f -exec sed -i -e "s#$OLD_SOPS#$NEW_SOPS#g" {} \;