From c817b8afc92e1cf0a49b7fdd54925eed1f857c08 Mon Sep 17 00:00:00 2001 From: Steven Borrelli Date: Thu, 31 Aug 2023 12:08:41 -0500 Subject: [PATCH] delete test hooks for deletion ordering Signed-off-by: Steven Borrelli --- examples/app-claim.yaml | 2 -- examples/cluster-claim.yaml | 2 -- examples/testhooks/delete-release-app.sh | 9 --------- examples/testhooks/delete-release.sh | 10 ---------- 4 files changed, 23 deletions(-) delete mode 100755 examples/testhooks/delete-release-app.sh delete mode 100755 examples/testhooks/delete-release.sh diff --git a/examples/app-claim.yaml b/examples/app-claim.yaml index 850ad5a..6f59dd0 100644 --- a/examples/app-claim.yaml +++ b/examples/app-claim.yaml @@ -3,8 +3,6 @@ kind: App metadata: name: platform-ref-aws-ghost namespace: default - annotations: - uptest.upbound.io/pre-delete-hook: testhooks/delete-release-app.sh spec: providerConfigRef: name: platform-ref-aws diff --git a/examples/cluster-claim.yaml b/examples/cluster-claim.yaml index 2dbe7da..074d57d 100644 --- a/examples/cluster-claim.yaml +++ b/examples/cluster-claim.yaml @@ -3,8 +3,6 @@ kind: Cluster metadata: name: platform-ref-aws namespace: default - annotations: - uptest.upbound.io/pre-delete-hook: testhooks/delete-release.sh spec: id: platform-ref-aws parameters: diff --git a/examples/testhooks/delete-release-app.sh b/examples/testhooks/delete-release-app.sh deleted file mode 100755 index 9492a56..0000000 --- a/examples/testhooks/delete-release-app.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -aeuo pipefail - -# Delete the release before deleting the cluster not to orphan the release object -# Note(turkenh): This is a workaround for the infamous dependency problem during deletion. -# Note(ytsarev): In addition to helm Release deletion we also need to pause -# XService reconciler to prevent it from recreating the Release. -${KUBECTL} annotate xapps.aws.platformref.upbound.io --all crossplane.io/paused="true" -${KUBECTL} delete release -l crossplane.io/claim-name=platform-ref-aws-ghost diff --git a/examples/testhooks/delete-release.sh b/examples/testhooks/delete-release.sh deleted file mode 100755 index 0f1c8eb..0000000 --- a/examples/testhooks/delete-release.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -aeuo pipefail - -# Delete the release before deleting the cluster not to orphan the release object -# Note(turkenh): This is a workaround for the infamous dependency problem during deletion. -# Note(ytsarev): In addition to helm Release deletion we also need to pause -# XService reconciler to prevent it from recreating the Release. -${KUBECTL} annotate xservices.aws.platformref.upbound.io --all crossplane.io/paused="true" -${KUBECTL} delete release -l crossplane.io/claim-name=platform-ref-aws -${KUBECTL} delete xirsa -l crossplane.io/claim-name=platform-ref-aws