Skip to content

Commit

Permalink
chore: import packages only once
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill committed Sep 5, 2023
1 parent cd51b9d commit c1d8e84
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
k8s_nginx "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned"
core "k8s.io/api/core/v1"
networking "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/api/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
meta "k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -199,7 +198,7 @@ func existVirtualServerCRDs(ctx context.Context, c *k8s_nginx.Clientset) bool {
}

func handleCRDCheckError(err error, resourceName string, apiGroup string) bool {
if meta.IsNoMatchError(err) || runtime.IsNotRegisteredError(err) || errors.IsNotFound(err) {
if meta.IsNoMatchError(err) || runtime.IsNotRegisteredError(err) || apierrors.IsNotFound(err) {
log.Infof("%s CRDs are not found. Not syncing %s resources.", resourceName, resourceName)
return false
}
Expand Down

0 comments on commit c1d8e84

Please sign in to comment.