From 5d2fa55cc72ce3fb422106a36d697aef7c3c3c78 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Tue, 7 Jun 2022 12:56:16 +0300 Subject: [PATCH 1/3] chore(helm): update go.mod Signed-off-by: Ilya Lesikov --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1ff2725cff..3bb18d3d4f 100644 --- a/go.mod +++ b/go.mod @@ -307,6 +307,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-20220607090441-92d1c219cc69 +replace helm.sh/helm/v3 => github.com/werf/3p-helm/v3 v3.0.0-20220607095328-f3081d5407cf replace github.com/go-git/go-git/v5 => github.com/ZauberNerd/go-git/v5 v5.4.3-0.20220315170230-29ec1bc1e5db diff --git a/go.sum b/go.sum index 9db48c85c4..d3028f7fe6 100644 --- a/go.sum +++ b/go.sum @@ -2032,8 +2032,8 @@ 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-20220607090441-92d1c219cc69 h1:Ri3CCX9UOThJ7Ie5MGV0dOgomgsDu+2VTPDa4XP09yw= -github.com/werf/3p-helm/v3 v3.0.0-20220607090441-92d1c219cc69/go.mod h1:NxtE2KObf2PrzDl6SIamPFPKyAqWi10iWuvKlQn/Yao= +github.com/werf/3p-helm/v3 v3.0.0-20220607095328-f3081d5407cf h1:fc5tXr3GvsGYQGdODC6jXvhx3CkHCeY7yPCpK45xJ48= +github.com/werf/3p-helm/v3 v3.0.0-20220607095328-f3081d5407cf/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= From 6f79a186b747f8096611a2ad6440a35084f72699 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Tue, 7 Jun 2022 12:56:46 +0300 Subject: [PATCH 2/3] feat(dismiss): dont fail if no release found Signed-off-by: Ilya Lesikov --- cmd/werf/dismiss/dismiss.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/werf/dismiss/dismiss.go b/cmd/werf/dismiss/dismiss.go index 1ea84315dc..b02a6e58e9 100644 --- a/cmd/werf/dismiss/dismiss.go +++ b/cmd/werf/dismiss/dismiss.go @@ -230,10 +230,12 @@ func runDismiss(ctx context.Context) error { return err } + dontFailIfNoRelease := true helmUninstallCmd := helm_v3.NewUninstallCmd(actionConfig, logboek.Context(ctx).OutStream(), helm_v3.UninstallCmdOptions{ - StagesSplitter: helm.StagesSplitter{}, - DeleteNamespace: &cmdData.WithNamespace, - DeleteHooks: &cmdData.WithHooks, + StagesSplitter: helm.StagesSplitter{}, + DeleteNamespace: &cmdData.WithNamespace, + DeleteHooks: &cmdData.WithHooks, + DontFailIfNoRelease: &dontFailIfNoRelease, }) if cmdData.WithNamespace { From 7a5233879f9fc7f0203b1cd6cd258f15f78e2964 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Tue, 7 Jun 2022 12:57:24 +0300 Subject: [PATCH 3/3] style: fmt Signed-off-by: Ilya Lesikov --- cmd/werf/helm/helm.go | 1 - .../helm/chart_extender/helpers/common_template_funcs.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/werf/helm/helm.go b/cmd/werf/helm/helm.go index cdf37c6b06..4bea310be5 100644 --- a/cmd/werf/helm/helm.go +++ b/cmd/werf/helm/helm.go @@ -203,7 +203,6 @@ func NewCmd() *cobra.Command { } else { panic(fmt.Sprintf("unexpected command %q, please report bug to the https://github.com/werf/werf", cmd.Name())) } - } } } diff --git a/pkg/deploy/helm/chart_extender/helpers/common_template_funcs.go b/pkg/deploy/helm/chart_extender/helpers/common_template_funcs.go index a50675055b..2e1be9b9cf 100644 --- a/pkg/deploy/helm/chart_extender/helpers/common_template_funcs.go +++ b/pkg/deploy/helm/chart_extender/helpers/common_template_funcs.go @@ -7,9 +7,8 @@ import ( "strings" "text/template" - "github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers/secrets" - "github.com/werf/logboek" + "github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers/secrets" ) func SetupIncludeWrapperFuncs(funcMap template.FuncMap) {