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

fix: do not create resources for marked deleted tenant #2310

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/controller/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,12 @@ func (c *Controller) syncHandler(key string) (Result, error) {
// will retry after 5sec
return WrapResult(Result{RequeueAfter: time.Second * 5}, nil)
}
// Check if the Tenant is marked to be deleted
// Shouldn't create resources when marked for deletion
if !tenant.DeletionTimestamp.IsZero() {
runtime.HandleError(fmt.Errorf("Tenant '%s' is marked for deletion, skipping", key))
return WrapResult(Result{}, nil)
}

// Check the Sync Version to see if the tenant needs upgrade
if tenant, err = c.checkForUpgrades(ctx, tenant); err != nil {
Expand Down
Loading