Skip to content

Commit

Permalink
make logging_component selectable
Browse files Browse the repository at this point in the history
  • Loading branch information
robertchoi80 committed Dec 21, 2021
1 parent 47f3f54 commit e0eb046
Showing 1 changed file with 41 additions and 6 deletions.
47 changes: 41 additions & 6 deletions templates/decapod-apps/lma-uniformed-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spec:
parameters:
- name: site_name
value: "hanu-reference"
# valid value: 'efk' or 'loki'
- name: logging_component
value: "efk"
- name: site_repo_url
value: "https://github.com/openinfradev/decapod-site"
- name: manifest_repo_url
Expand Down Expand Up @@ -50,7 +53,20 @@ spec:
- name: deploy
dag:
tasks:
- name: operator
- name: prometheus-operator
templateRef:
name: create-application
template: installApps
arguments:
parameters:
- name: list
value: |
[
{ "app_group": "lma", "path": "prometheus-operator", "namespace": "lma" }
]
dependencies: []

- name: eck-operator
templateRef:
name: create-application
template: installApps
Expand All @@ -59,12 +75,13 @@ spec:
- name: list
value: |
[
{ "app_group": "lma", "path": "prometheus-operator", "namespace": "lma" },
{ "app_group": "lma", "path": "eck-operator", "namespace": "elastic-system" },
{ "app_group": "lma", "path": "fluentbit-operator", "namespace": "lma" }
]
when: "{{workflow.parameters.logging_component}} == 'efk'"
dependencies: []
- name: logging

- name: logging-efk
templateRef:
name: create-application
template: installApps
Expand All @@ -77,7 +94,25 @@ spec:
{ "app_group": "lma", "path": "fluentbit", "namespace": "lma" },
{ "app_group": "lma", "path": "kubernetes-event-exporter", "namespace": "lma" }
]
dependencies: [operator]
when: "{{workflow.parameters.logging_component}} == 'efk'"
dependencies: [eck-operator]

- name: logging-loki
templateRef:
name: create-application
template: installApps
arguments:
parameters:
- name: list
value: |
[
{ "app_group": "lma", "path": "loki", "namespace": "lma" },
{ "app_group": "lma", "path": "promtail", "namespace": "lma" },
{ "app_group": "lma", "path": "kubernetes-event-exporter", "namespace": "lma" }
]
when: "{{workflow.parameters.logging_component}} == 'loki'"
dependencies: []

- name: prepare-lma
templateRef:
name: create-application
Expand All @@ -90,7 +125,7 @@ spec:
{ "app_group": "lma", "path": "thanos-config", "namespace": "lma" },
{ "app_group": "lma", "path": "prepare-etcd-secret", "namespace": "lma" }
]
dependencies: [operator]
dependencies: [prometheus-operator]

- name: prometheus
templateRef:
Expand Down Expand Up @@ -122,7 +157,7 @@ spec:
[
{ "app_group": "lma", "path": "thanos", "namespace": "lma" }
]
dependencies: [prometheus,logging]
dependencies: [prometheus,"logging-{{workflow.parameters.logging_component}}"]

- name: grafana
templateRef:
Expand Down

0 comments on commit e0eb046

Please sign in to comment.