airshipctl/manifests/function/baremetal-operator/replacements/versions.yaml
Sean Eagan a65a7e155b Externalize KRM function versions
Relates-To: #524
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: I7e811835ae1e5ab2cab65c398c53126f3a632405
2021-05-26 20:18:49 +00:00

115 lines
3.6 KiB
YAML

# These rules inject host-specific information from the `host-catalogue`
# into the hostgenerator-m3 function's Template plugin config.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: baremetal-operator-versions-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
# Container versions for the ironic Deployment
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.init_bootstrap.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.initContainers[?(.name == 'init-bootstrap')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.init_images.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.initContainers[?(.name == 'init-images')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.qcow_bundle.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.initContainers[?(.name == 'qcow-bundle')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.dnsmasq.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'dnsmasq')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.httpd.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'httpd')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.ironic.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'ironic')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.ironic.ironic_inspector.image}"
target:
objref:
kind: Deployment
name: ironic
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'ironic-inspector')].image}"]
# Container versions for the metal3-baremetal-operator Deployment
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.metal3_baremetal_operator.baremetal_operator.image}"
target:
objref:
kind: Deployment
name: metal3-baremetal-operator
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'baremetal-operator')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.metal3_baremetal_operator.ironic_proxy.image}"
target:
objref:
kind: Deployment
name: metal3-baremetal-operator
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'ironic-proxy')].image}"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.baremetal_operator.metal3_baremetal_operator.ironic_inspector_proxy.image}"
target:
objref:
kind: Deployment
name: metal3-baremetal-operator
fieldrefs: ["{.spec.template.spec.containers[?(.name == 'ironic-inspector-proxy')].image}"]