diff --git a/docs/deployments-and-hosting/kubernetes/helm-chart/router.mdx b/docs/deployments-and-hosting/kubernetes/helm-chart/router.mdx index ae1e4e2a..c189dc1f 100644 --- a/docs/deployments-and-hosting/kubernetes/helm-chart/router.mdx +++ b/docs/deployments-and-hosting/kubernetes/helm-chart/router.mdx @@ -76,6 +76,29 @@ commonConfiguration: |- log_level: "info" ``` +### File-based router configuration + +You can also specify a path to a configuration file that will be embedded into the chart. This is useful for managing complex configurations or when you want to keep configuration separate from the values file. + +```bash values.yaml +# Path to a configuration file to embed. If set, this takes precedence over commonConfiguration. +# The file path is relative to the chart directory and will be processed with the helm `tpl` function. +commonConfigurationPath: "configs/router-config.yaml" +``` + +Create your configuration file: + +```bash configs/router-config.yaml +version: "1" +log_level: "info" +# You can use Helm template variables in the file +controlplane_url: "{{ .Values.configuration.controlplaneUrl }}" +``` + + +The file will be processed with Helm's `tpl` function, allowing you to use template variables and functions within the configuration file. + + ### Install with a static Router Execution Config If you follow the default instructions the execution config is polled from the controlplane. Sometimes this is not desired e.g. when you have a strict CI/CD workflow or SLA requirements. The following instructions, shows you how to deploy a Router with a static router execution config.