Ignore notfound error on delete
@@ -5,7 +5,7 @@ import (
"path/filepath"
"github.com/devfile/library/pkg/devfile/parser"
- "k8s.io/api/apps/v1"
+ v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
@@ -71,7 +71,7 @@ func (do *DeleteComponentClient) DeleteResources(resources []unstructured.Unstru
continue
}
err = do.kubeClient.DeleteDynamicResource(resource.GetName(), gvr.Resource, wait)
- if err != nil {
+ if err != nil && !kerrors.IsNotFound(err) {
klog.V(3).Infof("failed to delete resource %q (%s.%s.%s): %v", resource.GetName(), gvr.Resource.Group, gvr.Resource.Version, gvr.Resource.Resource, err)
failed = append(failed, resource)
}
