Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/reaper: fatal when resources are not deleted #24

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

darkowlzz
Copy link
Contributor

@darkowlzz darkowlzz commented Nov 3, 2023

When resources are found but not deleted, fail to help detect that stale resources were found but not deleted.

$ go run ./ -provider gcp -tags 'environment=dev' -gcpproject test-project
Total resources found: 11
artifactregistry.googleapis.com/Repository: projects/test-project/locations/us-central1/repositories/flux-test-sharing-sawfly
compute.googleapis.com/Instance: gke-flux-test-sharing-sa-default-pool-9ff69617-gk5w
compute.googleapis.com/Disk: gke-flux-test-sharing-sa-default-pool-9ff69617-gk5w
compute.googleapis.com/Instance: gke-flux-test-sharing-sa-default-pool-314d00bb-l1k6
compute.googleapis.com/Disk: gke-flux-test-sharing-sa-default-pool-314d00bb-l1k6
compute.googleapis.com/Disk: gke-flux-test-sharing-sa-default-pool-310d55fd-xjd5
compute.googleapis.com/Instance: gke-flux-test-sharing-sa-default-pool-310d55fd-xjd5
compute.googleapis.com/InstanceTemplate: gke-flux-test-sharing-sa-default-pool-310d55fd
compute.googleapis.com/InstanceTemplate: gke-flux-test-sharing-sa-default-pool-314d00bb
compute.googleapis.com/InstanceTemplate: gke-flux-test-sharing-sa-default-pool-9ff69617
container.googleapis.com/Cluster: flux-test-sharing-sawfly
2023/11/04 00:49:45 resources found but not deleted
exit status 1

Related to the incident described in fluxcd/pkg#682, to be able to detect such situations easily in the future.

When resources are found but not deleted, fail to help detect that stale
resources were found but not deleted.

Signed-off-by: Sunny <[email protected]>
@darkowlzz darkowlzz requested a review from somtochiama November 3, 2023 19:37
@darkowlzz darkowlzz merged commit 0bc20e4 into main Nov 9, 2023
2 checks passed
@darkowlzz darkowlzz deleted the reaper-exit-code branch November 9, 2023 10:11
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.

2 participants