Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: (PSKD-398) Update v4m storage class deletion behavior #559

Merged
merged 4 commits into from
Jul 12, 2024
Merged

Conversation

jarpat
Copy link
Contributor

@jarpat jarpat commented Jul 1, 2024

Changes

Updated the uninstallation behavior when V4_CFG_MANAGE_STORAGE:true & PROVIDER in ["azure","aws","gcp"] so that the v4m storage class will not be removed if there are still PVs using it. If no PVs are making use of the v4m sc then it will also be removed. This prevents the v4m SC from being removed if a user just uninstalls only logging or only monitoring.

Tests

Scenario Provider Kubernetes Version Install Uninstall 1 Uninstall 2
1 Azure v1.28.9 baseline,viya,cluster-logging,cluster-monitoring,install uninstalling just cluster-logging did not remove the SC uninstalling just cluster-monitoring afterwards removes the SC
2 AWS v1.29.5-eks-1de2ab1 baseline,viya,cluster-logging,cluster-monitoring,install uninstalling just cluster-monitoring did not remove the SC uninstalling just cluster-logging afterwards removes the SC
3 GCP v1.28.11-gke.1019000 baseline,viya,cluster-logging,cluster-monitoring,install uninstalling just cluster-monitoring did not remove the SC uninstalling just cluster-logging afterwards removes the SC

@jarpat jarpat added the bug Something isn't working label Jul 1, 2024
@jarpat jarpat self-assigned this Jul 1, 2024
@jarpat jarpat changed the title fix: (PSKD-398) Update v4m storage deletion behavior fix: (PSKD-398) Update v4m storage class deletion behavior Jul 1, 2024
@@ -50,15 +50,40 @@
tags:
- cluster-logging

- name: V4M - check if storage class is being used
ansible.builtin.shell: |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, used shell here rather than the ansible kubernetes.core.k8s_info module since PVs are not filterable using field selectors. This was the cleanest way to search if any PVs using a particular SC that I found.

Field Selector Support: https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/#list-of-supported-fields

Copy link
Member

@dhoucgitter dhoucgitter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jarpat jarpat merged commit 1fee2a4 into staging Jul 12, 2024
3 checks passed
@jarpat jarpat deleted the PSKD-398 branch July 12, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants