Skip to content

Commit

Permalink
Merge pull request #114 from openinfradev/primary_cluster
Browse files Browse the repository at this point in the history
PrimaryCluster: do not install logging infras on a member cluster
  • Loading branch information
intelliguy committed May 9, 2023
2 parents da175ad + c445f8e commit 2ea2383
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions templates/decapod-apps/lma-uniformed-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ spec:
activeDeadlineSeconds: 120

- name: deploy
inputs:
parameters:
- name: install_logging_infra
value: true
dag:
tasks:
- name: prometheus-operator
- name: lma-operators
templateRef:
name: create-application
template: installApps
Expand All @@ -80,7 +84,7 @@ spec:
[
{ "app_group": "lma", "path": "eck-operator", "namespace": "elastic-system", "target_cluster": "" }
]
when: "{{workflow.parameters.logging_component}} == 'efk'"
when: "{{workflow.parameters.logging_component}} == 'efk' && {{workflow.parameters.organization_id}} == null"
dependencies: []

- name: logging-efk
Expand All @@ -92,11 +96,9 @@ spec:
- name: list
value: |
[
{ "app_group": "lma", "path": "eck-resource", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "fluentbit", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "kubernetes-event-exporter", "namespace": "lma", "target_cluster": "" }
{ "app_group": "lma", "path": "eck-resource", "namespace": "lma", "target_cluster": "" }
]
when: "{{workflow.parameters.logging_component}} == 'efk'"
when: "{{workflow.parameters.logging_component}} == 'efk' && {{workflow.parameters.organization_id}} == null"
dependencies: [eck-operator]

- name: logging-loki
Expand All @@ -109,11 +111,9 @@ spec:
value: |
[
{ "app_group": "lma", "path": "minio", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "loki", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "fluentbit", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "kubernetes-event-exporter", "namespace": "lma", "target_cluster": "" }
{ "app_group": "lma", "path": "loki", "namespace": "lma", "target_cluster": "" }
]
when: "{{workflow.parameters.logging_component}} == 'loki'"
when: "{{workflow.parameters.logging_component}} == 'loki' && {{workflow.parameters.organization_id}} == null"
dependencies: []

- name: prepare-lma
Expand All @@ -126,9 +126,11 @@ spec:
value: |
[
{ "app_group": "lma", "path": "thanos-config", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "prepare-etcd-secret", "namespace": "lma", "target_cluster": "" }
{ "app_group": "lma", "path": "prepare-etcd-secret", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "fluentbit", "namespace": "lma", "target_cluster": "" },
{ "app_group": "lma", "path": "kubernetes-event-exporter", "namespace": "lma", "target_cluster": "" }
]
dependencies: [prometheus-operator]
dependencies: [lma-operators]

- name: prometheus
templateRef:
Expand Down Expand Up @@ -160,4 +162,5 @@ spec:
[
{ "app_group": "lma", "path": "grafana", "namespace": "lma", "target_cluster": "" }
]
when: "{{inputs.parameters.install_logging_infra}}"
dependencies: [prometheus,"logging-{{workflow.parameters.logging_component}}"]

0 comments on commit 2ea2383

Please sign in to comment.