Files
airshipctl/manifests/function/hostgenerator-m3/replacements/hosts.yaml
Matt McEuen 910d296f6b Deduplicate airshipctl manifest networking
Deduplicate networking definitions inside of airshipctl functions,
and make the values driveable via a catalogue.

Changes:
* Removed BMO patches at site level; drive through catalogue instead.
* Added separate entrypoints for ephemeral & target site-level.
  catalogue/networking overrides. Ephemeral's kustomizes target's.
* Generalized the commonHostNetworking catalogue into a section in the
  overall networking catalogue.
* Cleaned up catalogue use in general.
* Got rid of some ill-formed Type-level phase definition.
  We should go back soon and define proper Type-level phases.

Change-Id: Iff96ccdcf7ebde4ae55e2b1a9d25dd1cdca0d2c8
Relates-To: https://github.com/airshipit/airshipctl/issues/315
2020-10-21 16:26:10 -05:00

40 lines
1009 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:dev
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: VariableCatalogue
name: networking
fieldref: "{.commonHostNetworking}"
target:
objref:
kind: Templater
name: m3-host-template
fieldrefs: ["{.values.commonNetworking}"]