PB-12512: Add Helm hooks for proper CRD lifecycle and monitoring resource cleanup#909
Open
vk-px wants to merge 2 commits into
Open
PB-12512: Add Helm hooks for proper CRD lifecycle and monitoring resource cleanup#909vk-px wants to merge 2 commits into
vk-px wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PB-12512: Add Helm hooks for proper CRD lifecycle and monitoring resource cleanup
Summary
This PR adds missing Helm hook operations for PX-Backup Helm installation to ensure proper ordering and lifecycle management of Custom Resource Definitions (CRDs) and monitoring resources.
Changes
1. CRD Helm Hooks (8 files)
Added Helm hook annotations to all Prometheus Operator CRDs to ensure they are created/updated before the main chart resources:
Annotations added:
2. Monitoring Resources Helm Hooks
Added post-install,post-upgrade hooks to ensure monitoring CR instances are created after CRDs are available:
3. Pre-Delete Cleanup Job (New File)
Added pxcentral-monitoring-cleanup.yaml - A new cleanup Job that runs on helm uninstall to properly delete Prometheus Operator custom resources before the CRDs are removed:
4. Dynamic UI Module Configuration
Updated pxcentral-ui-configmap.yaml to dynamically build FRONTEND_ENABLED_MODULES based on enabled features:
Why These Changes?
Testing Performed
K8s only cluster (without/with CRDS) successfull
helm 4 install -- successfull
helm 3 install/ helm 4 upgrade -- successfull
helm 4 install/ helm 4 upgrade -- successfull
helm 3 install -- successfull
RKE2 cluster (without/with CRD) successfull
helm 4 install -- successfull
helm 3 install/ helm 4 upgrade -- successfull
helm 4 install/ helm 4 upgrade -- successfull
helm 3 install -- successfull
portworx cluster (with/without CRDS) successfull
helm 4 install -- successfull
helm 3 install/ helm 4 upgrade -- successfull
helm 4 install/ helm 4 upgrade -- successfull
helm 3 install -- successfull