router icon indicating copy to clipboard operation
router copied to clipboard

Helm chart - cannot unset values.router.configuration safely

Open shaikatzz opened this issue 1 year ago • 2 comments

Describe the bug I would like to provide my own config.yaml file into the container, and in order to do so i have to make router.configuration empty so it will skip setting --config /app/configuration.yaml.

The problem is that if I set this value to empty, it will fail on service creation because of this line: index .Values.router.configuration "health_check").listen

With the following error: Error: template: router/charts/router/templates/service.yaml:21:31: executing "router/charts/router/templates/service.yaml" at <index .Values.router.configuration "health_check">: error calling index: cannot index slice/array with type string

To Reproduce Steps to reproduce the behavior: set this chart as a depedency of a new chart you create an run helm template . --set router.router.configuration={}

Expected behavior should unset configuration safely and let us load our own config file from file system.

shaikatzz avatar Mar 11 '24 11:03 shaikatzz

I am having similar experience where we are unable to successfully use APOLLO_ROUTER_CONFIG_PATH b/c the following cli option is always set regardless if router.configuration is undefined in the Values

This reference lists and describes the options supported by the router binary. Where indicated, some of these options can also be provided via an environment variable. If an option is provided both ways, the command-line value takes precedence.

sure seems like --config should not be populated if the values file doesn't define router.configuration given the Chart

        - args:
            - '--config'
            - /app/configuration.yaml

having the same experience with helm template locally, as well as using ArgoCD's version of helm

version.BuildInfo{Version:"v3.14.3", GitCommit:"f03cc04caaa8f6d7c3e67cf918929150cf6f3f12", GitTreeState:"clean", GoVersion:"go1.22.1"}

dan-catalano-vc avatar Apr 09 '24 23:04 dan-catalano-vc

created a discussion on the topic https://github.com/apollographql/router/discussions/4934

dan-catalano-vc avatar Apr 10 '24 02:04 dan-catalano-vc