grafana / helm-charts

Apache License 2.0
1.66k stars 2.28k forks source link

tempo-distributed helm install fails if gateway:enabled:true #3427

Open danstadler-pdx opened 4 days ago

danstadler-pdx commented 4 days ago

I tried deploying charts/tempo-distributed with the following in my custom yaml file:

gateway:
  enabled: true

And I get this output:

helm -n tempo-test install tempo grafana/tempo-distributed -f custom.yaml
Error: INSTALLATION FAILED: YAML parse error on tempo-distributed/templates/gateway/deployment-gateway.yaml: error converting YAML to JSON: yaml: line 103: mapping values are not allowed in this context

When running with dry-run / debug, I also get all of this:

helm -n tempo-test install tempo grafana/tempo-distributed -f custom.yaml --dry-run --debug > dryrun-gateway-true.y
aml
install.go:218: [debug] Original chart version: ""
install.go:235: [debug] CHART PATH: /Users/danstadler/Library/Caches/helm/repository/tempo-distributed-1.20.1.tgz

Error: INSTALLATION FAILED: YAML parse error on tempo-distributed/templates/gateway/deployment-gateway.yaml: error converting YAML to JSON: yaml: line 103: mapping values are not allowed in this context
helm.go:84: [debug] error converting YAML to JSON: yaml: line 103: mapping values are not allowed in this context
YAML parse error on tempo-distributed/templates/gateway/deployment-gateway.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
    helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
    helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
    helm.sh/helm/v3/pkg/action/action.go:168
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
    helm.sh/helm/v3/pkg/action/install.go:304
main.runInstall
    helm.sh/helm/v3/cmd/helm/install.go:310
main.newInstallCmd.func2
    helm.sh/helm/v3/cmd/helm/install.go:156
github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.8.0/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.8.0/command.go:1039
main.main
    helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
    runtime/proc.go:271
runtime.goexit
    runtime/asm_arm64.s:1222
INSTALLATION FAILED
main.newInstallCmd.func2
    helm.sh/helm/v3/cmd/helm/install.go:158
github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.8.0/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.8.0/command.go:1039
main.main
    helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
    runtime/proc.go:271
runtime.goexit
    runtime/asm_arm64.s:1222
skpaz commented 2 days ago

Ran into the same issue on the latest version.

My gateway.yaml file:

gateway:
  enabled: true
enterpriseGateway:
  enabled: true
  useDefaultProxyURLs: true
  replicas: 1

Chart info:

∟ % helm search repo grafana/tempo-distributed           
NAME                        CHART VERSION   APP VERSION DESCRIPTION                       
grafana/tempo-distributed   1.21.1          2.6.0       Grafana Tempo in MicroService mode

Links to lines in question:

https://github.com/grafana/helm-charts/blob/d8224757f599319e24cd8267f32b0cee43e17cc0/charts/tempo-distributed/values.yaml#L1811-L1817

https://github.com/grafana/helm-charts/blob/d8224757f599319e24cd8267f32b0cee43e17cc0/charts/tempo-distributed/templates/gateway/deployment-gateway.yaml#L101-L104

I've been poking around various YAML and HELM validators and haven't found any issues, yet.

skpaz commented 2 days ago

Found the problem w/ some help from @hedss -

This is for the OSS version, and can be enabled/disabled explicitly:

gateway:
  enabled: true

Reference: https://github.com/grafana/helm-charts/blob/d8224757f599319e24cd8267f32b0cee43e17cc0/charts/tempo-distributed/values.yaml#L1753

This is for GET, and is automatically enabled when enterprise.enabled=true:

enterpriseGateway:
  ...

Reference: https://github.com/grafana/helm-charts/blob/d8224757f599319e24cd8267f32b0cee43e17cc0/charts/tempo-distributed/values.yaml#L2180

If gateway.enabled=true, the install will fail with the error outlined by @danstadler-pdx . Once I set gateway.enabled=false, the install completed.

It's referenced in our docs here: