Add LMA to multi-tenant target cluster

This change adds the lma-infra composite to the multi-tenant type,
target workload phase, and lma-configs to the workload-config phase

Relates-To: #150
Change-Id: Ia57f468d09a0de920b06300b383a530f0ea6e802
This commit is contained in:
Steven Fitzpatrick 2021-06-03 04:09:51 +00:00
parent 458789d454
commit 87f6638711
8 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,6 @@
resources:
- ../../../../type/multi-tenant/target/workload-config
- ../catalogues
transformers:
- ../../../../type/multi-tenant/target/workload-config/replacements

View File

@ -1,2 +1,13 @@
resources:
- ../../../../function/workload-config
- ../../../../function/lma-configs
patches:
- path: patches/cluster-flow.yaml
target:
kind: ClusterFlow
name: all-pods
- path: patches/cluster-output.yaml
target:
kind: ClusterOutpt
name: elasticsearch

View File

@ -0,0 +1,6 @@
- op: add
path: /spec/filters/-
value:
record_modifier:
records:
- airship-cluster: target

View File

@ -0,0 +1,3 @@
- op: replace
path: /spec/elasticsearch/host
value: %LOADBALANCER%:%NODEPORT%

View File

@ -0,0 +1,2 @@
resources:
- lma-elasticsearch-output.yaml

View File

@ -0,0 +1,29 @@
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: lma-elasticsearch-output-address
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
kind: VariableCatalogue
name: subcluster-networking
fieldref: "{.spec.lma.kubernetes.controlPlaneEndpoint.host}"
target:
objref:
kind: ClusterOutput
name: elasticsearch
fieldrefs: ["{.spec.elasticsearch.host}%LOADBALANCER%"]
- source:
objref:
kind: VariableCatalogue
name: subcluster-networking
fieldref: "{.spec.lma.exposed_services[(@.name == 'elasticsearch-ingest')].nodePort}"
target:
objref:
kind: ClusterOutput
name: elasticsearch
fieldrefs: ["{.spec.elasticsearch.host}%NODEPORT%"]

View File

@ -6,3 +6,4 @@ resources:
- ../../../../function/vino
- ../../../../function/helm-chart-repository/
- ../../../../function/local-storage
- ../../../../composite/lma-infra

View File

@ -6,3 +6,4 @@ resources:
- ../../../../../function/vino/replacements
- ../../../../../function/helm-chart-repository/replacements
- ../../../../../function/local-storage/replacements
- ../../../../../composite/lma-infra/replacements