airshipctl/manifests/function/k8scontrol/replacements/versions.yaml
Matt McEuen f15e7e5e41 Add airshipctl versions catalogue & replacements
This extracts the container, disk image, and Kubernetes versions that
are defined in airshipctl functions, into an `versions-airshipctl`
catalogue in the `airshipctl-catalogues` function.  The default version
values have been left in-place in their resources as well, and will
be used if the user decides not to apply the catalogue via a
transformer at the site level (it's not currently required to actually
use the catalogue or associate replacment rules).

Please see the READMEs in this change for more information.

Note: replacement of CAPI component container versions must be done
through a slightly different mechanism and will be in a
follow-on changeset.

Note that this also incorporates a fix to pin the Ironic images, which
are currently not compatible at the :latest tag.

Co-Authored-By: Alexander Noskov <anoskov@mirantis.com>
Change-Id: Iafe1d185a7e7d3932576055eda819d2270b02482
Relates-To: https://github.com/airshipit/airshipctl/issues/316
2020-09-03 18:12:27 -05:00

28 lines
771 B
YAML

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