From c2526c91e99923c48a0438b4ce171da7f6d80536 Mon Sep 17 00:00:00 2001 From: "roi.kramer" Date: Wed, 23 Feb 2022 11:16:45 +0200 Subject: [PATCH] Delete command should ignore resources that cannot be found --- pkg/kube/kube.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kube/kube.go b/pkg/kube/kube.go index 52bbdcba..e205a1bb 100644 --- a/pkg/kube/kube.go +++ b/pkg/kube/kube.go @@ -112,7 +112,7 @@ func AddFlags(flags *pflag.FlagSet) Factory { Timeout: &timeout, KubeConfig: &kubeConfig, Namespace: &namespace, - Context: &context, + Context: &context, } confFlags.AddFlags(flags) mvFlags := cmdutil.NewMatchVersionFlags(confFlags) @@ -257,7 +257,7 @@ func (f *factory) Delete(ctx context.Context, opts *DeleteOptions) error { cmdutil.AddDryRunFlag(cmd) - cmd.SetArgs([]string{}) + cmd.SetArgs([]string{"--ignore-not-found"}) return cmd.ExecuteContext(ctx) }