Files
airshipctl/manifests/function/hostgenerator-m3/replacements/hosts.yaml
Matthew Fuller 5820e22d9f Create NetworkCatalogue structural schema CRD
Replaces the networking VariableCatalogue with a
structural schema NetworkCatalogue CRD.

Relates-To: #468
Change-Id: I9973708799ec35c2dde5832e7400c798dc7adae1
2021-02-24 18:03:01 +00:00

40 lines
1016 B
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: m3-host-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: quay.io/airshipit/replacement-transformer:latest
replacements:
- source:
objref:
name: host-catalogue
fieldref: "{.hosts.m3}"
target:
objref:
kind: Templater
name: m3-host-template
fieldrefs: ["{.values.hosts}"]
- source:
objref:
name: host-generation-catalogue
fieldref: "{.hosts.m3}"
target:
objref:
kind: Templater
name: m3-host-template
fieldrefs: ["{.values.hostsToGenerate}"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: "{.spec.commonHostNetworking}"
target:
objref:
kind: Templater
name: m3-host-template
fieldrefs: ["{.values.commonNetworking}"]