diff --git a/manifests/site/reference-multi-tenant/target/workload-config/kustomization.yaml b/manifests/site/reference-multi-tenant/target/workload-config/kustomization.yaml new file mode 100644 index 000000000..7f89f0365 --- /dev/null +++ b/manifests/site/reference-multi-tenant/target/workload-config/kustomization.yaml @@ -0,0 +1,6 @@ +resources: + - ../../../../type/multi-tenant/target/workload-config + - ../catalogues + +transformers: + - ../../../../type/multi-tenant/target/workload-config/replacements diff --git a/manifests/type/multi-tenant/target/workload-config/kustomization.yaml b/manifests/type/multi-tenant/target/workload-config/kustomization.yaml index fb58236b5..1171d01fd 100644 --- a/manifests/type/multi-tenant/target/workload-config/kustomization.yaml +++ b/manifests/type/multi-tenant/target/workload-config/kustomization.yaml @@ -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 diff --git a/manifests/type/multi-tenant/target/workload-config/patches/cluster-flow.yaml b/manifests/type/multi-tenant/target/workload-config/patches/cluster-flow.yaml new file mode 100644 index 000000000..ca9ae59f6 --- /dev/null +++ b/manifests/type/multi-tenant/target/workload-config/patches/cluster-flow.yaml @@ -0,0 +1,6 @@ +- op: add + path: /spec/filters/- + value: + record_modifier: + records: + - airship-cluster: target diff --git a/manifests/type/multi-tenant/target/workload-config/patches/cluster-output.yaml b/manifests/type/multi-tenant/target/workload-config/patches/cluster-output.yaml new file mode 100644 index 000000000..089296227 --- /dev/null +++ b/manifests/type/multi-tenant/target/workload-config/patches/cluster-output.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/elasticsearch/host + value: %LOADBALANCER%:%NODEPORT% diff --git a/manifests/type/multi-tenant/target/workload-config/replacements/kustomization.yaml b/manifests/type/multi-tenant/target/workload-config/replacements/kustomization.yaml new file mode 100644 index 000000000..752e7aede --- /dev/null +++ b/manifests/type/multi-tenant/target/workload-config/replacements/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - lma-elasticsearch-output.yaml diff --git a/manifests/type/multi-tenant/target/workload-config/replacements/lma-elasticsearch-output.yaml b/manifests/type/multi-tenant/target/workload-config/replacements/lma-elasticsearch-output.yaml new file mode 100644 index 000000000..5a6d38625 --- /dev/null +++ b/manifests/type/multi-tenant/target/workload-config/replacements/lma-elasticsearch-output.yaml @@ -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%"] diff --git a/manifests/type/multi-tenant/target/workload/kustomization.yaml b/manifests/type/multi-tenant/target/workload/kustomization.yaml index daea8dabe..a3df3b125 100644 --- a/manifests/type/multi-tenant/target/workload/kustomization.yaml +++ b/manifests/type/multi-tenant/target/workload/kustomization.yaml @@ -6,3 +6,4 @@ resources: - ../../../../function/vino - ../../../../function/helm-chart-repository/ - ../../../../function/local-storage + - ../../../../composite/lma-infra diff --git a/manifests/type/multi-tenant/target/workload/replacements/kustomization.yaml b/manifests/type/multi-tenant/target/workload/replacements/kustomization.yaml index 6cb8165f7..e0859a6a6 100644 --- a/manifests/type/multi-tenant/target/workload/replacements/kustomization.yaml +++ b/manifests/type/multi-tenant/target/workload/replacements/kustomization.yaml @@ -6,3 +6,4 @@ resources: - ../../../../../function/vino/replacements - ../../../../../function/helm-chart-repository/replacements - ../../../../../function/local-storage/replacements + - ../../../../../composite/lma-infra/replacements