Skip to content

Commit

Permalink
bin: delete admin-rbac last in clean scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-elastisys committed Nov 22, 2024
1 parent 707258c commit 60a88b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scripts/clean-sc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fi
"${here}/.././bin/ck8s" ops velero sc uninstall

# Destroy all helm releases
"${here}/.././bin/ck8s" ops helmfile sc -l app!=cert-manager destroy
"${here}/.././bin/ck8s" ops helmfile sc -l app!=cert-manager -l app!=admin-rbac destroy

# Clean up namespaces and any other resources left behind by the apps
"${here}/.././bin/ck8s" ops kubectl sc delete ns dex opensearch-system harbor fluentd-system gatekeeper-system thanos ingress-nginx monitoring kured falco velero
Expand Down Expand Up @@ -132,3 +132,5 @@ if [ -n "$GATE_CONS" ]; then
# shellcheck disable=SC2086
"${here}/.././bin/ck8s" ops kubectl sc delete --ignore-not-found=true $GATE_CONS
fi

"${here}/.././bin/ck8s" ops helmfile sc -l app=admin-rbac destroy
4 changes: 3 additions & 1 deletion scripts/clean-wc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fi
"${here}/.././bin/ck8s" ops velero wc uninstall

# Destroy all helm releases
"${here}/.././bin/ck8s" ops helmfile wc -l app!=cert-manager destroy
"${here}/.././bin/ck8s" ops helmfile wc -l app!=cert-manager -l app!=admin-rbac destroy

# Clean up namespaces and any other resources left behind by the apps
"${here}/.././bin/ck8s" ops kubectl wc delete ns alertmanager falco fluentd-system fluentd gatekeeper-system hnc-system ingress-nginx monitoring velero kured
Expand Down Expand Up @@ -120,3 +120,5 @@ mapfile -t HNC_CRDS < <("${here}/.././bin/ck8s" ops kubectl wc api-resources --a
if [[ "${#HNC_CRDS[@]}" -gt 0 ]]; then
"${here}/.././bin/ck8s" ops kubectl wc delete crds "${HNC_CRDS[@]}"
fi

"${here}/.././bin/ck8s" ops helmfile wc -l app=admin-rbac destroy

0 comments on commit 60a88b3

Please sign in to comment.