e9f35dabe8
* modified image_repositories section schema in version catalogue. new type : type map[string]ImageRepositorySpec old type : string. * replaced registry attribute in Installation resource from version-catalogue image_repositories section. * updated old attributes from image_repositories section as per new schema. Closes: #590 Change-Id: I2159e23b8a63b5f48d2f4e79b56c2bc021646c77
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.controlplane.repository}"
|
|
target:
|
|
objref:
|
|
kind: KubeadmControlPlane
|
|
name: cluster-controlplane
|
|
fieldrefs: ["{.spec.kubeadmConfigSpec.clusterConfiguration.imageRepository}"]
|