airshipctl/manifests/function/hostgenerator-m3/replacements/hosts.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

40 lines
1001 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: localhost/replacement-transformer
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}"]