Skip to content

Commit

Permalink
initial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jarpat committed Jun 27, 2024
1 parent 863fc72 commit 2ac379a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions roles/monitoring/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@
tags:
- cluster-logging

- name: V4M - check if storage class is being used
ansible.builtin.shell: |
kubectl --kubeconfig {{ KUBECONFIG }} get pv --output=custom-columns='PORT:.spec.storageClassName' | grep -o v4m | wc -l
register: sc_users
when:
- PROVIDER is not none
- PROVIDER in ["azure","aws","gcp"]
- V4_CFG_MANAGE_STORAGE is not none
- V4_CFG_MANAGE_STORAGE|bool
tags:
- uninstall

- name: V4M - storageclass uninstall status
debug:
msg: "{{ sc_users.stdout }} Persistent Volumes still referring to the v4m Storage Class, skipping deletion"
when:
- PROVIDER is not none
- PROVIDER in ["azure","aws","gcp"]
- V4_CFG_MANAGE_STORAGE is not none
- V4_CFG_MANAGE_STORAGE|bool
- sc_users.stdout | int > 0
tags:
- uninstall

- name: V4M - remove storageclass
kubernetes.core.k8s:
kubeconfig: "{{ KUBECONFIG }}"
Expand All @@ -60,5 +84,6 @@
- PROVIDER == "azure"
- V4_CFG_MANAGE_STORAGE is not none
- V4_CFG_MANAGE_STORAGE|bool
- sc_users.stdout | int == 0
tags:
- uninstall

0 comments on commit 2ac379a

Please sign in to comment.