Skip to content

Commit 7e1fdfd

Browse files
committed
Fix errors api check for missing ConfigMap
1 parent ce50e30 commit 7e1fdfd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/cmd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
flag "github.com/spf13/pflag"
4040
apps "k8s.io/api/apps/v1"
4141
core "k8s.io/api/core/v1"
42+
apiErrors "k8s.io/apimachinery/pkg/api/errors"
4243
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
4344
"k8s.io/apimachinery/pkg/runtime"
4445
"k8s.io/client-go/kubernetes"
@@ -555,7 +556,7 @@ func ensureFeaturesConfigMap(ctx context.Context, client typedCore.ConfigMapInte
555556
nctx, c := globals.GetGlobalTimeouts().Kubernetes().WithTimeout(ctx)
556557
defer c()
557558
if cm, err := client.Get(nctx, features.ConfigMapName(), meta.GetOptions{}); err != nil {
558-
if !deploymentApi.IsNotFound(err) {
559+
if !apiErrors.IsNotFound(err) {
559560
return err
560561
}
561562

0 commit comments

Comments
 (0)