Skip to content

Add remove-ace.sh for Flux and fargocd (Argo CD) setups - #1387

Open
ArnobKumarSaha wants to merge 3 commits into
masterfrom
arnob-uninstall
Open

ArnobKumarSaha wants to merge 3 commits into
masterfrom
arnob-uninstall

Conversation

@ArnobKumarSaha

Copy link
Copy Markdown
Member

uninstall-ace.sh exits on Argo CD setups (e.g. OpenShift), where HelmReleases are only mirrored into Argo CD Applications by fargocd and Flux controllers are absent. This adds two scripts next to it (it is left unchanged):

  • hack/deploy/delete-helmrelease.sh <ns> [hr...] [--timeout=2m] [--force]: deletes HRs one by one. On timeout:
    • fargocd HR: clears finalizers of the Application's terminating objects. Argo CD never clears argocd.argoproj.io/hook-finalizer of Helm-hook objects (e.g. kube-ui-server's ClusterRoles) when an Application is deleted.
    • Flux HR: clears finalizers of the release manifest's terminating objects.
    • --force: last resort, clears the Application or HR finalizer.
  • hack/deploy/remove-ace.sh [--full-prune] [--force]: runner, same flow as uninstall-ace.sh, plus:
    • requires the Flux controllers only for Flux-managed HRs, and fargocd + argocd-application-controller for fargocd-managed ones;
    • aceshifter joins the core set, removed in its own dependsOn order after the other core releases (it used to land in wave 1, because the core HRs depending on it are excluded from the graph);
    • warns about KubeDB databases / KubeStash BackupConfigurations outside ACE namespaces.

Tested: the manual equivalent of this order on an ARO (OpenShift 4.21) + Argo CD cluster. The scripts only passed bash -n; they haven't been run end to end.

delete-helmrelease.sh deletes HelmReleases one by one and unblocks stuck
ones per mode: for fargocd-mirrored HRs it clears finalizers of the
Application's terminating objects (Argo CD never clears
argocd.argoproj.io/hook-finalizer of Helm hooks on Application delete);
for Flux HRs it clears those of the release manifest.

remove-ace.sh is the runner: it requires the Flux controllers only for
Flux-managed HRs (fargocd/Argo CD otherwise), removes aceshifter after the
core releases that depend on it, and warns about KubeDB/KubeStash objects
outside ACE namespaces.

Signed-off-by: Arnob kumar saha <arnob@appscode.com>
… in remove-ace.sh

Signed-off-by: Arnob kumar saha <arnob@appscode.com>
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
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