Skip to content

Commit

Permalink
Merge pull request #2022 from ks-ci-bot/cherry-pick-2021-to-release-3.3
Browse files Browse the repository at this point in the history
[release-3.3] Adjust ks-istio-monitoring to ensure monitoring files are installed
  • Loading branch information
pixiake authored Jun 21, 2022
2 parents b77a8fa + ec14daa commit 946fc74
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
19 changes: 0 additions & 19 deletions roles/ks-istio/files/prometheus/readme.md

This file was deleted.

11 changes: 0 additions & 11 deletions roles/ks-istio/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- "istio"
- "kiali"
- "jaeger"
- "prometheus"

- name: servicemesh | Unarchive istio files
shell: >
Expand Down Expand Up @@ -81,16 +80,6 @@

- import_tasks: kiali-install.yaml

# create prometheus config by PodMonitor and SerivceMonitor CR
# wait until PodMonitor kind created.
- name: servicemesh | Creating prometheus config
shell: >
{{ bin_dir }}/kubectl apply -f {{ kubesphere_dir }}/servicemesh/prometheus/prometheus-operator.yaml
register: prom_result
failed_when: false
until: prom_result is succeeded
retries: 5
delay: 5

- name: servicemesh | set servicemesh status enabled
shell: >
Expand Down
11 changes: 11 additions & 0 deletions roles/ks-monitor/tasks/ks-istio-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: Monitoring | Getting ks-istio monitoring installation files
copy:
src: "{{ item }}"
dest: "{{ kubesphere_dir }}/"
loop:
- "ks-istio-monitoring"

- name: Monitoring | Installing ks-istio monitoring
shell: >
{{ bin_dir }}/kubectl apply -f {{ kubesphere_dir }}/ks-istio-monitoring --force
4 changes: 4 additions & 0 deletions roles/ks-monitor/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
when:
- "status.monitoring is not defined or status.monitoring.status is not defined or status.monitoring.status != 'enabled'"

- import_tasks: ks-istio-monitoring.yaml
when:
- "servicemesh.enabled is defined and servicemesh.enabled"

- import_tasks: gpu-monitoring.yaml
when:
- "status.monitoring is not defined or status.monitoring.status is not defined or status.monitoring.status != 'enabled'"
Expand Down

0 comments on commit 946fc74

Please sign in to comment.