30691affe8
Change-Id: I454f5e9b92290d0c5b24830621a396f07354f90b
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
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: localhost/replacement-transformer
|
|
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}"]
|
|
# Replace the imageRepository in the KubeadmControlPlane
|
|
- source:
|
|
objref:
|
|
kind: VersionsCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.spec.image_repositories}"
|
|
target:
|
|
objref:
|
|
kind: KubeadmControlPlane
|
|
name: cluster-controlplane
|
|
fieldrefs: ["{.spec.kubeadmConfigSpec.clusterConfiguration.imageRepository}"]
|