Add wstunnel debug level and external template support#42
Conversation
Introduces new configuration options for wstunnel: 1. Debug Level Control: - Added wstunnelDebugLevel flag in values.yaml (default: "DEBUG") - Supports standard log levels: DEBUG, INFO, WARN, ERROR - Updated wstunnel-template_nginx.yaml and wstunnel-template_traefik.yaml to use variable - Config passed through InterLinkConfig.yaml to wstunnel templates 2. External Template Reference: - Added externalTemplate flag to reference local files or ConfigMap names - Added useExternalConfigMap flag to use existing ConfigMap instead of creating one - Priority: externalTemplate > customTemplate > templateType > default Usage examples: - Set debug level: virtualNode.network.wstunnelDebugLevel: "INFO" - Use local file: virtualNode.network.externalTemplate: "my-custom-template.yaml" - Use ConfigMap: virtualNode.network.externalTemplate: "my-configmap" and useExternalConfigMap: true
There was a problem hiding this comment.
Pull request overview
Adds new Helm values to control wstunnel server log level and to optionally source the wstunnel template from an external file (packaged with the chart) or an existing ConfigMap, wiring these settings through the generated InterLinkConfig and wstunnel templates.
Changes:
- Parameterize wstunnel server
--log-lvlviavirtualNode.network.wstunnelDebugLevel. - Add
externalTemplateanduseExternalConfigMapvalues to control where the wstunnel template is sourced from, and adjust template ConfigMap creation/mounting accordingly. - Propagate
WstunnelDebugLevelintoInterLinkConfig.yamlfor downstream template rendering.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| interlink/wstunnel-template_traefik.yaml | Uses templated {{.WstunnelDebugLevel}} for wstunnel server log level. |
| interlink/wstunnel-template_nginx.yaml | Uses templated {{.WstunnelDebugLevel}} for wstunnel server log level. |
| interlink/values.yaml | Introduces externalTemplate, useExternalConfigMap, and wstunnelDebugLevel chart values. |
| interlink/templates/virtual-kubelet.yaml | Switches the mounted ConfigMap name when using an externally managed ConfigMap. |
| interlink/templates/virtual-kubelet-config.yaml | Adds WstunnelDebugLevel to InterLinkConfig and implements external-template precedence when creating the template ConfigMap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Custom wstunnel template content (optional, overrides templateType if set) | ||
| customTemplate: "" | ||
| # External template reference (overrides customTemplate and templateType if set) | ||
| # Can be a local file path (e.g., "wstunnel-template_custom.yaml") or ConfigMap name |
There was a problem hiding this comment.
externalTemplate is documented as accepting a "local file path", but the chart uses .Files.Get to load it, which only reads files packaged inside the Helm chart. If users set an arbitrary local path at install time, Helm will fail with a "file not found" render error. Please clarify the comment to indicate it must be a chart file path (or recommend using customTemplate/--set-file for truly local content).
| # Can be a local file path (e.g., "wstunnel-template_custom.yaml") or ConfigMap name | |
| # When useExternalConfigMap is false, this must be a path to a file packaged inside this Helm chart | |
| # (for example, "wstunnel-template_custom.yaml"), not an arbitrary local filesystem path. | |
| # For truly local content at install/upgrade time, use customTemplate or --set-file instead. |
| - name: wstunnel-template | ||
| configMap: | ||
| {{- if .Values.virtualNode.network.useExternalConfigMap }} | ||
| name: {{ .Values.virtualNode.network.externalTemplate }} |
There was a problem hiding this comment.
When useExternalConfigMap is true, the ConfigMap name is taken directly from virtualNode.network.externalTemplate. If externalTemplate is empty (the default), this will render an invalid volume reference and the Pod will fail to start. Consider enforcing that externalTemplate is non-empty when useExternalConfigMap is true (e.g., using Helm's required function or by adding a conditional that errors out).
| name: {{ .Values.virtualNode.network.externalTemplate }} | |
| name: {{ required "virtualNode.network.externalTemplate must be set when virtualNode.network.useExternalConfigMap is true" .Values.virtualNode.network.externalTemplate }} |
Introduces new configuration options for wstunnel:
Debug Level Control:
External Template Reference:
Usage examples:
Summary
Related issue :