Ignore error in storkctl if deploymentconfig type isn't found
@@ -13,6 +13,7 @@ import (
"github.com/portworx/sched-ops/k8s"
"github.com/portworx/sched-ops/task"
"github.com/spf13/cobra"
+ "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/genericclioptions"
@@ -220,7 +221,9 @@ func updateDeployments(namespace string, activate bool, ioStreams genericcliopti
func updateDeploymentConfigs(namespace string, activate bool, ioStreams genericclioptions.IOStreams) {
deployments, err := k8s.Instance().ListDeploymentConfigs(namespace)
if err != nil {
+ if !errors.IsNotFound(err) {
util.CheckErr(err)
+ }
return
}
for _, deployment := range deployments.Items {
