0

I'm installing a local Helm chart; however, I keep getting an error Error: UPGRADE FAILED: create: failed to create: Request entity too large: limit is 3145728. From searching other SO/Stack Exchange questions, this is typically caused by unnecessary files mistakenly included in the chart. The way to resolve this, is to add those entries to a .helmignore file.

My chart has a .helmignore file, which should be excluding all unnecessary artifacts within my chart, but I'm still getting the error. So my thought is that my .helmignore entries aren't quite targeting the files that they should be.

I've tried running them with the --debug flag (didn't show anything more interesting):

upgrade.go:139: [debug] preparing upgrade for chartname
upgrade.go:520: [debug] copying values from chartname (v11) to new release.
upgrade.go:147: [debug] performing update for chartname
upgrade.go:319: [debug] creating upgraded release for chartname
Error: UPGRADE FAILED: create: failed to create: Request entity too large: limit is 3145728
helm.go:88: [debug] Request entity too large: limit is 3145728ffff
create: failed to create
helm.sh/helm/v3/pkg/storage/driver.(*Secrets).Create
        helm.sh/helm/v3/pkg/storage/driver/secrets.go:164
helm.sh/helm/v3/pkg/storage.(*Storage).Create
        helm.sh/helm/v3/pkg/storage/storage.go:69
helm.sh/helm/v3/pkg/action.(*Upgrade).performUpgrade
        helm.sh/helm/v3/pkg/action/upgrade.go:320
helm.sh/helm/v3/pkg/action.(*Upgrade).RunWithContext
        helm.sh/helm/v3/pkg/action/upgrade.go:148
main.newUpgradeCmd.func2
        helm.sh/helm/v3/cmd/helm/upgrade.go:200
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.2.1/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.2.1/command.go:974
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.2.1/command.go:902
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
        runtime/proc.go:255
runtime.goexit
        runtime/asm_arm64.s:1133
UPGRADE FAILED
main.newUpgradeCmd.func2
        helm.sh/helm/v3/cmd/helm/upgrade.go:202
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.2.1/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.2.1/command.go:974
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.2.1/command.go:902
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
        runtime/proc.go:255
runtime.goexit
        runtime/asm_arm64.s:1133

I also tried it with the --dry-run flag and the chart succeeded. So at this point I'm not sure how to find what's bloating my chart.

How can I tell which files are actually getting ignored (or which are included) when I run a helm install or helm upgrade?

1 Answer 1

1

Figured out a way, but it might not be the most elegant.

First, we render the chart locally and then use tree to print out the subdirectories with their sizes in a human-readable format.

helm template . --output-dir=file-size-test
tree --du -h file-size-test

This produces an output similar to:

[340M]  testing123
└── [340M]  chart_name
    ├── [ 91K]  charts
    │   ├── [ 58K]  sub-chart
    │   │   └── [ 58K]  templates
    │   │       ├── [1.3K]  deployment.yaml
    │   │       ├── [ 411]  config.yaml
    │   │       ├── [ 579]  service.yaml
    │   │       └── [ 359]  serviceaccount.yaml
<truncated>
    └── [340M]  templates
        ├── [ 68M]  deployment.yaml
        ├── [136M]  config1.yaml
        ├── [136M]  config2.yaml
        └── [1.3K]  ingress.yaml

So now I've found that the issue seems to be the massive config1.yaml and config2.yaml files.

While this doesn't exactly answer the question of how to find which have been ignored, it at least points to which might not have been ignored.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.