Skip to content

Commit

Permalink
fix: service controller not skipping sentinel errs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Pragliola committed Oct 14, 2022
1 parent 2fc1be8 commit 56bc852
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/servicelabels/abstract.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ func (r *abstractServiceLabelsReconciler) InjectClient(c client.Client) error {
func (r *abstractServiceLabelsReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
tenant, err := r.getTenant(ctx, request.NamespacedName, r.client)
if err != nil {
if errors.As(err, &NonTenantObjectError{}) || errors.As(err, &NoServicesMetadataError{}) {
noTenantObjError := &NonTenantObjectError{}
noSvcMetaError := &NoServicesMetadataError{}

if errors.As(err, &noTenantObjError) || errors.As(err, &noSvcMetaError) {
return reconcile.Result{}, nil
}

Expand Down

0 comments on commit 56bc852

Please sign in to comment.