mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-17 16:08:23 +02:00
fix: Set HelmBinary in execer constructor (#928)
This overrides the default helm command, if provided, as soon as possible. This way it is already used in `visitStates`. I ran into an issue using `HELM3` and `--helm-binary` together with helm-secrets. I previously used tillerless, which i could now remove. This however caused `DecryptSecret` to fail, as it would still use the helm2 binary; because it runs before the first `helm.SetHelmBinary` call. While helm-secrets is not fully helm3 compatible yet, its uses within helmfile are, and i was able to just install it as a helm3 plugin.
This commit is contained in:
@@ -13,10 +13,6 @@ import (
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
const (
|
||||
command = "helm"
|
||||
)
|
||||
|
||||
type decryptedSecret struct {
|
||||
mutex sync.RWMutex
|
||||
bytes []byte
|
||||
@@ -50,9 +46,9 @@ func NewLogger(writer io.Writer, logLevel string) *zap.SugaredLogger {
|
||||
}
|
||||
|
||||
// New for running helm commands
|
||||
func New(logger *zap.SugaredLogger, kubeContext string, runner Runner) *execer {
|
||||
func New(helmBinary string, logger *zap.SugaredLogger, kubeContext string, runner Runner) *execer {
|
||||
return &execer{
|
||||
helmBinary: command,
|
||||
helmBinary: helmBinary,
|
||||
logger: logger,
|
||||
kubeContext: kubeContext,
|
||||
runner: runner,
|
||||
|
||||
Reference in New Issue
Block a user