From 2e0505e9219abb71727394c689918276d1f8d3a4 Mon Sep 17 00:00:00 2001 From: Anthony Spring Date: Mon, 13 Jan 2020 23:05:04 -0500 Subject: [PATCH] Remove --force from the helm3 command due to https://github.com/helm/helm/issues/7350 --- CHANGELOG.md | 4 ++++ cmd/sync.go | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ff776..0e781e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). - None at this time. +## [0.2.1] - 2020-01-13 + +- Remove the explicit '--force' from the command passed to helm3 upgrade during a `binnacle sync`. + ## [0.2.0] - 2020-01-13 - This release introduces Helm 3 support by adding a lightweight touchpoint to detect if helm2 or helm3 is getting targetted and treating helm2 as the exception case for processing. This will allow helm2 support to be easily removed upon its EOL. To facilitate this detected binnacle will run `helm version` during certain commands to help determine the target version and change the underlying helm commands accordingly. diff --git a/cmd/sync.go b/cmd/sync.go index 56cd504..3a740d1 100644 --- a/cmd/sync.go +++ b/cmd/sync.go @@ -103,7 +103,10 @@ func syncCharts(charts []config.ChartConfig, args ...string) error { cmdArgs = append(cmdArgs, chart.Release) cmdArgs = append(cmdArgs, chart.ChartShortName()) cmdArgs = append(cmdArgs, "-i") - cmdArgs = append(cmdArgs, "--force") + + if IsHelm2() { + cmdArgs = append(cmdArgs, "--force") + } if len(chart.Namespace) > 0 { cmdArgs = append(cmdArgs, "--namespace")