
A previous patchset was intended to accomplish a two-part substitution of container versions into CAPI components, to work around assumptions held by clusterctl: (versions catalogue) --[ReplacementTransformer]--> (Clusterctl YAML) ... then (Clusterctl YAML) --[clusterctl library]--> (CAPI manifests) However, only the second leg (the hard part) worked right; the first part had gaps which are fixed by this change. This also adds the CAPD container definitions to the Clusterctl variables. Change-Id: Ifaca46f6dd3b87c28753cd49b52e62556ead52bd Closes: https://github.com/airshipit/airshipctl/issues/389
117 lines
3.0 KiB
YAML
117 lines
3.0 KiB
YAML
# These rules inject versioned artifacts into the clusterctl function.
|
|
apiVersion: airshipit.org/v1alpha1
|
|
kind: ReplacementTransformer
|
|
metadata:
|
|
name: k8scontrol-versions-replacements
|
|
annotations:
|
|
config.kubernetes.io/function: |-
|
|
container:
|
|
image: quay.io/airshipit/replacement-transformer:dev
|
|
replacements:
|
|
# Replace capm3 versions
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.capm3.manager}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CAPM3_MANAGER}"]
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.capm3.auth_proxy}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CAPM3_AUTH_PROXY}"]
|
|
# Replace cacpk versions
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.cacpk.manager}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CACPK_MANAGER}"]
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.cacpk.auth_proxy}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CACPK_AUTH_PROXY}"]
|
|
# Replace cabpk versions
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.cabpk.manager}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CABPK_MANAGER}"]
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.cabpk.auth_proxy}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CABPK_AUTH_PROXY}"]
|
|
# Replace capd versions
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.capd.manager}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CAPD_MANAGER}"]
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.capd.auth_proxy}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CAPD_AUTH_PROXY}"]
|
|
# Replace capi versions
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.capi.manager}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CAPI_MANAGER}"]
|
|
- source:
|
|
objref:
|
|
kind: VariableCatalogue
|
|
name: versions-airshipctl
|
|
fieldref: "{.images.capi.auth_proxy}"
|
|
target:
|
|
objref:
|
|
kind: Clusterctl
|
|
name: clusterctl_init
|
|
fieldrefs: ["{.additional-vars.CONTAINER_CAPI_AUTH_PROXY}"]
|
|
|