Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

werf helm dep update fails when secret-values are used #3443

Closed
rgeraskin opened this issue Mar 31, 2021 · 1 comment · Fixed by #3447
Closed

werf helm dep update fails when secret-values are used #3443

rgeraskin opened this issue Mar 31, 2021 · 1 comment · Fixed by #3447

Comments

@rgeraskin
Copy link

With the .helm/secret-values.yaml file command werf helm dep update .helm fails. Without .helm/secret-values.yaml works fine.

❯ werf helm dep update .helm
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x22099f6]

goroutine 1 [running]:
github.com/werf/werf/pkg/deploy/secrets_manager.(*SecretsManager).GetYamlEncoder(0x0, 0x2e57920, 0xc0008275f0, 0xc000050144, 0x18, 0x0, 0x0, 0x0)
        /home/ubuntu/actions-runner/_work/werf/werf/pkg/deploy/secrets_manager/secret_manager.go:27 +0x26
github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers/secrets.(*SecretsRuntimeData).DecodeAndLoadSecrets(0xc000cdaba0, 0x2e57920, 0xc0008275f0, 0xc00065f900, 0xa, 0x10, 0x0, 0x0, 0x0, 0x7ffff29d7bd6, ...)
        /home/ubuntu/actions-runner/_work/werf/werf/pkg/deploy/helm/chart_extender/helpers/secrets/secrets_runtime_data.go:31 +0x66e
github.com/werf/werf/pkg/deploy/helm/chart_extender.(*WerfChartStub).ChartLoaded(0xc000114cc0, 0xc00065f900, 0xa, 0x10, 0xa, 0x10)
        /home/ubuntu/actions-runner/_work/werf/werf/pkg/deploy/helm/chart_extender/werf_chart_stub.go:73 +0x170
helm.sh/helm/v3/pkg/chart/loader.LoadFiles(0xc00065ed80, 0xa, 0x10, 0x2e7b940, 0xc000114cc0, 0xc000664620, 0x0, 0x0, 0x0)
        /home/ubuntu/go/pkg/mod/github.com/werf/helm/v3@v3.0.0-20210330195046-3366eb633f7f/pkg/chart/loader/load.go:195 +0x1f6d
helm.sh/helm/v3/pkg/chart/loader.LoadDirWithOptions(0x7ffff29d7bd6, 0x5, 0x2e7b940, 0xc000114cc0, 0xc000664620, 0x0, 0xc00014dac8, 0x40c4c6)
        /home/ubuntu/go/pkg/mod/github.com/werf/helm/v3@v3.0.0-20210330195046-3366eb633f7f/pkg/chart/loader/directory.go:63 +0x107
helm.sh/helm/v3/pkg/chart/loader.LoadDir(...)
        /home/ubuntu/go/pkg/mod/github.com/werf/helm/v3@v3.0.0-20210330195046-3366eb633f7f/pkg/chart/loader/directory.go:48
helm.sh/helm/v3/pkg/downloader.(*Manager).loadChartDir(0xc0004afa70, 0x25d9a80, 0xc00061dcc0, 0xc000680000)
        /home/ubuntu/go/pkg/mod/github.com/werf/helm/v3@v3.0.0-20210330195046-3366eb633f7f/pkg/downloader/manager.go:228 +0x13a
helm.sh/helm/v3/pkg/downloader.(*Manager).Update(0xc0004afa70, 0xc0004afa70, 0x2)
        /home/ubuntu/go/pkg/mod/github.com/werf/helm/v3@v3.0.0-20210330195046-3366eb633f7f/pkg/downloader/manager.go:154 +0x40
helm.sh/helm/v3/cmd/helm.newDependencyUpdateCmd.func1(0xc000615080, 0xc00068cdc0, 0x1, 0x1, 0x0, 0x0)
        /home/ubuntu/go/pkg/mod/github.com/werf/helm/v3@v3.0.0-20210330195046-3366eb633f7f/cmd/helm/dependency_update.go:74 +0x1d1
github.com/werf/werf/cmd/werf/helm.NewCmd.func2(0xc000615080, 0xc00068cdc0, 0x1, 0x1, 0x0, 0x0)
        /home/ubuntu/actions-runner/_work/werf/werf/cmd/werf/helm/helm.go:162 +0x630
github.com/spf13/cobra.(*Command).execute(0xc000615080, 0xc00068cda0, 0x1, 0x1, 0xc000615080, 0xc00068cda0)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000f6000, 0x0, 0xc0000cac30, 0x405b1f)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
main.main()
        /home/ubuntu/actions-runner/_work/werf/werf/cmd/werf/main.go:64 +0x119
❯ werf version
v1.2.10+fix21
@distorhead
Copy link
Member

Reproduced, will fix ASAP.

distorhead added a commit that referenced this issue Apr 1, 2021
 - Fix panic on werf-helm-dep-update when secret-values are used (fixes #3443).
 - Set .Values.werf.env="" stub werf service value in werf-helm-* commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants