-
-
Notifications
You must be signed in to change notification settings - Fork 613
feat(common): add settings property to addons schema #44937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,13 +5,52 @@ It will include / inject the required templates based on the given values. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- define "tc.v1.common.addon.tailscale" -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $ts := $.Values.addons.tailscale -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $ts.enabled -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $settings := $ts.settings | default dict -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{/* Merge settings into environment variables */}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $env := $ts.container.env | default dict -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.config -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_CONFIG" $settings.config -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.authkey -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_AUTH_KEY" $settings.authkey -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if hasKey $settings "userspace" -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_USERSPACE" $settings.userspace -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if hasKey $settings "auth_once" -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_AUTH_ONCE" $settings.auth_once -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if hasKey $settings "accept_dns" -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_ACCEPT_DNS" $settings.accept_dns -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.routes -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_ROUTES" $settings.routes -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.dest_ip -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_DEST_IP" $settings.dest_ip -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.sock5_server -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_SOCKS5_SERVER" $settings.sock5_server -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.extra_args -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_EXTRA_ARGS" $settings.extra_args -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.daemon_extra_args -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_TAILSCALED_EXTRA_ARGS" $settings.daemon_extra_args -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- if $settings.outbound_http_proxy_listen -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- $_ := set $env "TS_OUTBOUND_HTTP_PROXY_LISTEN" $settings.outbound_http_proxy_listen -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{- end -}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+44
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{/* Merge settings into environment variables */}} | |
| {{- $env := $ts.container.env | default dict -}} | |
| {{- if $settings.config -}} | |
| {{- $_ := set $env "TS_CONFIG" $settings.config -}} | |
| {{- end -}} | |
| {{- if $settings.authkey -}} | |
| {{- $_ := set $env "TS_AUTH_KEY" $settings.authkey -}} | |
| {{- end -}} | |
| {{- if hasKey $settings "userspace" -}} | |
| {{- $_ := set $env "TS_USERSPACE" $settings.userspace -}} | |
| {{- end -}} | |
| {{- if hasKey $settings "auth_once" -}} | |
| {{- $_ := set $env "TS_AUTH_ONCE" $settings.auth_once -}} | |
| {{- end -}} | |
| {{- if hasKey $settings "accept_dns" -}} | |
| {{- $_ := set $env "TS_ACCEPT_DNS" $settings.accept_dns -}} | |
| {{- end -}} | |
| {{- if $settings.routes -}} | |
| {{- $_ := set $env "TS_ROUTES" $settings.routes -}} | |
| {{- end -}} | |
| {{- if $settings.dest_ip -}} | |
| {{- $_ := set $env "TS_DEST_IP" $settings.dest_ip -}} | |
| {{- end -}} | |
| {{- if $settings.sock5_server -}} | |
| {{- $_ := set $env "TS_SOCKS5_SERVER" $settings.sock5_server -}} | |
| {{- end -}} | |
| {{- if $settings.extra_args -}} | |
| {{- $_ := set $env "TS_EXTRA_ARGS" $settings.extra_args -}} | |
| {{- end -}} | |
| {{- if $settings.daemon_extra_args -}} | |
| {{- $_ := set $env "TS_TAILSCALED_EXTRA_ARGS" $settings.daemon_extra_args -}} | |
| {{- end -}} | |
| {{- if $settings.outbound_http_proxy_listen -}} | |
| {{- $_ := set $env "TS_OUTBOUND_HTTP_PROXY_LISTEN" $settings.outbound_http_proxy_listen -}} | |
| {{- end -}} | |
| {{/* Merge settings into environment variables (with backward-compatible fallbacks) */}} | |
| {{- $env := $ts.container.env | default dict -}} | |
| {{- $config := $settings.config | default $ts.config -}} | |
| {{- if $config -}} | |
| {{- $_ := set $env "TS_CONFIG" $config -}} | |
| {{- end -}} | |
| {{- $authkey := $settings.authkey | default $ts.authkey -}} | |
| {{- if $authkey -}} | |
| {{- $_ := set $env "TS_AUTH_KEY" $authkey -}} | |
| {{- end -}} | |
| {{- if or (hasKey $settings "userspace") (hasKey $ts "userspace") -}} | |
| {{- $_ := set $env "TS_USERSPACE" ($settings.userspace | default $ts.userspace) -}} | |
| {{- end -}} | |
| {{- if or (hasKey $settings "auth_once") (hasKey $ts "auth_once") -}} | |
| {{- $_ := set $env "TS_AUTH_ONCE" ($settings.auth_once | default $ts.auth_once) -}} | |
| {{- end -}} | |
| {{- if or (hasKey $settings "accept_dns") (hasKey $ts "accept_dns") -}} | |
| {{- $_ := set $env "TS_ACCEPT_DNS" ($settings.accept_dns | default $ts.accept_dns) -}} | |
| {{- end -}} | |
| {{- $routes := $settings.routes | default $ts.routes -}} | |
| {{- if $routes -}} | |
| {{- $_ := set $env "TS_ROUTES" $routes -}} | |
| {{- end -}} | |
| {{- $destIP := $settings.dest_ip | default $ts.dest_ip -}} | |
| {{- if $destIP -}} | |
| {{- $_ := set $env "TS_DEST_IP" $destIP -}} | |
| {{- end -}} | |
| {{- $socks5 := $settings.sock5_server | default $ts.sock5_server -}} | |
| {{- if $socks5 -}} | |
| {{- $_ := set $env "TS_SOCKS5_SERVER" $socks5 -}} | |
| {{- end -}} | |
| {{- $extraArgs := $settings.extra_args | default $ts.extra_args -}} | |
| {{- if $extraArgs -}} | |
| {{- $_ := set $env "TS_EXTRA_ARGS" $extraArgs -}} | |
| {{- end -}} | |
| {{- $daemonExtraArgs := $settings.daemon_extra_args | default $ts.daemon_extra_args -}} | |
| {{- if $daemonExtraArgs -}} | |
| {{- $_ := set $env "TS_TAILSCALED_EXTRA_ARGS" $daemonExtraArgs -}} | |
| {{- end -}} | |
| {{- $outboundProxy := $settings.outbound_http_proxy_listen | default $ts.outbound_http_proxy_listen -}} | |
| {{- if $outboundProxy -}} | |
| {{- $_ := set $env "TS_OUTBOUND_HTTP_PROXY_LISTEN" $outboundProxy -}} | |
| {{- end -}} |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1026,8 +1026,6 @@ addons: | |||||
| enabled: false | ||||||
| targetSelector: | ||||||
| - main | ||||||
| # -- you can directly specify the config file here | ||||||
| config: "" | ||||||
| container: | ||||||
| enabled: true | ||||||
| imageSelector: "tailscaleImage" | ||||||
|
|
@@ -1051,34 +1049,28 @@ addons: | |||||
| TS_KUBE_SECRET: "" | ||||||
| TS_SOCKET: /var/run/tailscale/tailscaled.sock | ||||||
| TS_STATE_DIR: /var/lib/tailscale/state | ||||||
| TS_USERSPACE: true | ||||||
| TS_AUTH_ONCE: true | ||||||
| TS_ACCEPT_DNS: false | ||||||
| TS_AUTH_KEY: "" | ||||||
| TS_TAILSCALED_EXTRA_ARGS: "" | ||||||
| TS_EXTRA_ARGS: "" | ||||||
| TS_SOCKS5_SERVER: "" | ||||||
| TS_DEST_IP: "" | ||||||
| TS_ROUTES: "" | ||||||
| TS_OUTBOUND_HTTP_PROXY_LISTEN: "" | ||||||
| securityContext: | ||||||
| capabilities: | ||||||
| add: | ||||||
| - NET_ADMIN | ||||||
| - NET_RAW | ||||||
|
|
||||||
| # -- Auth key to connect to the VPN Service | ||||||
| authkey: "" | ||||||
| # As a sidecar, it should only need to run in userspace | ||||||
| userspace: true | ||||||
| auth_once: true | ||||||
| accept_dns: false | ||||||
| routes: "" | ||||||
| dest_ip: "" | ||||||
| sock5_server: "" | ||||||
| extra_args: "" | ||||||
| daemon_extra_args: "" | ||||||
| outbound_http_proxy_listen: "" | ||||||
| # -- Tailscale settings | ||||||
| settings: | ||||||
| # -- you can directly specify the config file here | ||||||
| config: "" | ||||||
| # -- Auth key to connect to the VPN Service | ||||||
| authkey: "" | ||||||
| # As a sidecar, it should only need to run in userspace | ||||||
| userspace: true | ||||||
| auth_once: true | ||||||
| accept_dns: false | ||||||
| routes: "" | ||||||
| dest_ip: "" | ||||||
| sock5_server: "" | ||||||
|
||||||
| sock5_server: "" | |
| socks5_server: "" |
Copilot
AI
Feb 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation in charts/library/common/docs/addons.md should be updated to document the new addons.$addon.settings property. This is a significant structural change that users need to know about. Consider adding a section similar to the existing sections for container, service, and ingress that explains:
- The purpose of the settings property
- That it contains addon-specific configuration
- That different addons have different settings (reference addon-specific documentation or values.yaml for details)
- An example showing how to use it
This would help users understand the new structure and how to migrate from the old configuration format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description states "maintaining backward compatibility through
additionalProperties" but this is inaccurate. TheadditionalProperties: truein the schema only allows extra keys to be present without validation errors; it does not provide backward compatibility for the old configuration structure. The template code does not implement any fallback logic to read from the old structure (addons.tailscale.authkey) when the new structure (addons.tailscale.settings.authkey) is not present. This is a breaking API change that requires users to migrate their configuration.