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:
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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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
```

View File

@ -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"

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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: |

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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" {} \;