Skip to content

Commit

Permalink
Fixing issue due to missing tenant being removed (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
cniackz committed Apr 5, 2023
1 parent 9892fc3 commit c0f148d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,11 @@ func (c *Controller) syncHandler(key string) error {

// Custom certificates
if customCertificates, err := c.getCustomCertificates(ctx, tenant); err == nil {
if tenant, err = c.updateCustomCertificatesStatus(ctx, tenant, customCertificates); err != nil {
if newTenant, err := c.updateCustomCertificatesStatus(ctx, tenant, customCertificates); err != nil {
klog.V(2).Infof(err.Error())
} else {
// Only change tenant if there was no error, otherwise tenant is being deleted
tenant = newTenant
}
} else {
klog.V(2).Infof(err.Error())
Expand Down

0 comments on commit c0f148d

Please sign in to comment.