Skip to content

Commit

Permalink
fix ccm not found error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kon-angelo committed Nov 29, 2024
1 parent 039256c commit ba7a8a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/infrastructure/infraflow/ensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/gardener/gardener/pkg/utils/flow"
"github.com/go-logr/logr"
appsv1 "k8s.io/api/apps/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/ptr"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -771,7 +772,7 @@ func (fctx *FlowContext) MigrateAvailabilitySet(ctx context.Context) error {
Name: azure.CloudControllerManagerName,
}, deployment); k8sclient.IgnoreNotFound(err) != nil {
return err
} else if k8sclient.IgnoreNotFound(err) != nil {
} else if err != nil && apierrors.IsNotFound(err) {
return nil
}

Expand Down

0 comments on commit ba7a8a1

Please sign in to comment.