Files
airshipctl/manifests/function/k8scontrol/replacements/versions.yaml
Sean Eagan 299b2833b2 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
2021-03-24 09:28:54 -05:00

34 lines
987 B
YAML

# These rules inject versioned artifacts into the k8scontrol function.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: k8scontrol-versions-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: quay.io/airshipit/replacement-transformer:v2
replacements:
# Replace the Kubernetes version in the KubeadmControlPlane
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.kubernetes}"
target:
objref:
kind: KubeadmControlPlane
name: cluster-controlplane
fieldrefs: ["{.spec.version}"]
# Replace the controlplane disk image in the Metal3MachineTemplate
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.files.k8scontrol.cluster_controlplane_image}"
target:
objref:
kind: Metal3MachineTemplate
name: cluster-controlplane
fieldrefs: ["{.spec.template.spec.image}"]