Skip to content
Permalink
Browse files
fix(helm): skip delete if unmatched resource ownership metadata
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Jul 19, 2022
1 parent c2bee51 commit ab416bab534d63382715ba30b861bb10c64ce56b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 go.mod
@@ -317,6 +317,6 @@ replace k8s.io/helm => github.com/werf/helm v0.0.0-20210202111118-81e74d46da0f

replace github.com/deislabs/oras => github.com/werf/third-party-oras v0.9.1-0.20210927171747-6d045506f4c8

replace helm.sh/helm/v3 => github.com/werf/3p-helm/v3 v3.0.0-20220718123145-564bda55b0dd
replace helm.sh/helm/v3 => github.com/werf/3p-helm/v3 v3.0.0-20220719112911-d6a64ce60923

replace github.com/go-git/go-git/v5 => github.com/ZauberNerd/go-git/v5 v5.4.3-0.20220315170230-29ec1bc1e5db
6 go.sum
@@ -2047,14 +2047,12 @@ github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59b
github.com/weppos/publicsuffix-go v0.4.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k=
github.com/weppos/publicsuffix-go v0.5.0 h1:rutRtjBJViU/YjcI5d80t4JAVvDltS6bciJg2K1HrLU=
github.com/weppos/publicsuffix-go v0.5.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k=
github.com/werf/3p-helm/v3 v3.0.0-20220718123145-564bda55b0dd h1:rf0XzNhkO5jegMo32mbhHoH0ZKNRG37VxLdW2FlY604=
github.com/werf/3p-helm/v3 v3.0.0-20220718123145-564bda55b0dd/go.mod h1:NxtE2KObf2PrzDl6SIamPFPKyAqWi10iWuvKlQn/Yao=
github.com/werf/3p-helm/v3 v3.0.0-20220719112911-d6a64ce60923 h1:LRZ4ttan7Cv7IZRu2ScGcyzV6vqnszRkv2xuyXAhc1o=
github.com/werf/3p-helm/v3 v3.0.0-20220719112911-d6a64ce60923/go.mod h1:NxtE2KObf2PrzDl6SIamPFPKyAqWi10iWuvKlQn/Yao=
github.com/werf/copy-recurse v0.2.4 h1:kEyGUKhgS8WdEOjInNQKgk4lqPWzP2AgR27F3dcGsVc=
github.com/werf/copy-recurse v0.2.4/go.mod h1:KVHSQ90p19xflWW0B7BJhLBwmSbEtuxIaBnjlUYRPhk=
github.com/werf/helm v0.0.0-20210202111118-81e74d46da0f h1:81YscYTF9mmTf0ULOsCmm42YWQp+qWDzWi1HjWniZrg=
github.com/werf/helm v0.0.0-20210202111118-81e74d46da0f/go.mod h1:OMONwLWU9zEENgaVjWEX+M+xik2QakejzKHG1+6mnUo=
github.com/werf/kubedog v0.9.0 h1:IQ702rO1l0qGsmS7BdFxIXm5GQwM1ijpI908sCslIoI=
github.com/werf/kubedog v0.9.0/go.mod h1:MIvQv19uLxcZMwATRE4sOtfUy36o99oBqmlXPk30U+A=
github.com/werf/kubedog v0.9.1 h1:TLXttYA2Doiu0ehPqV0nPNc+LkLnC7SpgX6Nhq4zGAw=
github.com/werf/kubedog v0.9.1/go.mod h1:MIvQv19uLxcZMwATRE4sOtfUy36o99oBqmlXPk30U+A=
github.com/werf/lockgate v0.0.0-20200729113342-ec2c142f71ea h1:R5tJUhL5a3YfHTrHWyuAdJW3h//fmONrpHJjjAZ79e4=
@@ -358,6 +358,10 @@ func asVersioned(info *resource.Info) runtime.Object {
}

func (waiter *ResourcesWaiter) WaitUntilDeleted(ctx context.Context, specs []*helm_kube.ResourcesWaiterDeleteResourceSpec, timeout time.Duration) error {
if len(specs) == 0 {
return nil
}

if waiter.KubeInitializer != nil {
if err := waiter.KubeInitializer.Init(ctx); err != nil {
return fmt.Errorf("kube initializer failed: %w", err)

0 comments on commit ab416ba

Please sign in to comment.