-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1033 from k8up-io/fix/cleanups_stuck
Make sure the backup cleanup is always triggered
- Loading branch information
Showing
6 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bats | ||
|
||
load "lib/utils" | ||
load "lib/detik" | ||
load "lib/k8up" | ||
|
||
# shellcheck disable=SC2034 | ||
DETIK_CLIENT_NAME="kubectl" | ||
# shellcheck disable=SC2034 | ||
DETIK_CLIENT_NAMESPACE="k8up-e2e-subject" | ||
# shellcheck disable=SC2034 | ||
DEBUG_DETIK="true" | ||
|
||
@test "Given empty namespace, When creating multiple backups, Then expect cleanup" { | ||
given_a_running_operator | ||
given_a_clean_ns | ||
given_s3_storage | ||
|
||
kubectl apply -f definitions/secrets | ||
yq e '.spec.podSecurityContext.runAsUser='$(id -u)' | .metadata.name="first-backup"' definitions/backup/backup.yaml | kubectl apply -f - | ||
|
||
yq e '.spec.podSecurityContext.runAsUser='$(id -u)' | .metadata.name="second-backup"' definitions/backup/backup.yaml | kubectl apply -f - | ||
|
||
kubectl -n "$DETIK_CLIENT_NAMESPACE" annotate backup/second-backup reconcile=now | ||
|
||
wait_for_until_jsonpath backup/second-backup 5m 'jsonpath={.status.conditions[?(@.type=="Scrubbed")].message}="Deleted 1 resources"' | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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