Skip to content

Rewrite uninstall-ace.sh to remove only ACE-owned releases - #1364

Merged
ArnobKumarSaha merged 3 commits into
masterfrom
arnob-uninst-ace
Oct 10, 2026
Merged

ArnobKumarSaha merged 3 commits into
masterfrom
arnob-uninst-ace

Conversation

@ArnobKumarSaha

Copy link
Copy Markdown
Member

Rewrites hack/deploy/uninstall-ace.sh so it works on edge clusters running other workloads.

  • Selects Flux HelmReleases by owner annotation (meta.helm.sh/release-name = ace-installer or a FeatureSet name) instead of a hardcoded list; unrelated releases are untouched.
  • Uninstalls via Flux (deletes HRs, keeps helm-controller running) in order: ace → catalog-manager → ace/gateway → rest → opscenter-features + Features → core (cert-manager, license-proxyserver, kube-ui-server, akp-crd-manager) → ace-installer.
  • Deletes Grafana/Perses dashboards while ACE's Grafana/Perses is still up.
  • If an HR is stuck after 2m, strips finalizers of terminating objects in its Helm release (their controllers may already be uninstalled), then the HR's own finalizer as last resort.
  • Always deletes ACE data (Jobs and PVCs in ace) and dangling ACE APIServices.
  • --full-prune additionally deletes ManagedClusters, KubeDB databases (WipeOut), KubeStash backups/repositories/storages, AppsCode CRDs and ACE namespaces. Third-party CRDs (cert-manager, prometheus-operator, gateway-api, envoy, OCM, trickster) are never deleted.
  • Portable across macOS bash 3.2 and Linux bash 5.x; requires kubectl, helm, jq.

Select HelmReleases by their ace-installer/FeatureSet owner annotation
instead of a hardcoded list, uninstall them via Flux in dependency order,
unblock releases whose finalizer controllers are already gone, and add
--full-prune to also remove KubeDB/KubeStash/OCM objects, AppsCode CRDs
and ACE namespaces. Third-party CRDs are never touched.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
Delete ManagedClusters and the ClusterManager while the cluster-manager
operator and work-controller are still running, so the hub deployments,
webhooks, RBAC and ManifestWork finalizers get cleaned up instead of
being orphaned.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
…eases

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 9edd565 into master Oct 10, 2026
4 of 5 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the arnob-uninst-ace branch October 10, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant