feat(tailscale): add common flags as fields (#3741)
* feat(tailscale): add common flags as fields * Update charts/stable/tailscale/templates/_configmap.tpl Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/stable/tailscale/docs/How-To-Guide.md Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * change to ClusterIP * set hostnetwork * remove service altogether Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ sources:
|
|||||||
- https://github.com/truecharts/charts/tree/master/charts/stable/tailscale
|
- https://github.com/truecharts/charts/tree/master/charts/stable/tailscale
|
||||||
- https://hub.docker.com/r/tailscale/tailscale
|
- https://hub.docker.com/r/tailscale/tailscale
|
||||||
- https://github.com/tailscale/tailscale/blob/main/docs/k8s/run.sh
|
- https://github.com/tailscale/tailscale/blob/main/docs/k8s/run.sh
|
||||||
version: 1.0.9
|
version: 1.1.0
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- network
|
- network
|
||||||
|
|||||||
@@ -42,17 +42,13 @@ Leave defaults here.
|
|||||||
- `Accept DNS`: Enabling it will pass your Global Nameservers from Tailscale to your local install.
|
- `Accept DNS`: Enabling it will pass your Global Nameservers from Tailscale to your local install.
|
||||||
- `Routes`: Change to the routes you wish Tailscale to have access to on the devices it's connected, such as my LAN in the example.
|
- `Routes`: Change to the routes you wish Tailscale to have access to on the devices it's connected, such as my LAN in the example.
|
||||||
- `Extra Args` passes arguments/flags to the `tailscale up` command.
|
- `Extra Args` passes arguments/flags to the `tailscale up` command.
|
||||||
|
- `Hostname` You can specify a specific hostname for use inside Tailscale (see image below). (Passes `--hostname HOSTNAME` to `Extra args`)
|
||||||
Common flags/arguments:
|
- `Advertise as exit node` This is used to pass traffic through tailscale like a private VPN. (Passes `--advertise-exit-node` to `Extra args`)
|
||||||
|
|
||||||
- `--advertise-exit-node`
|
|
||||||
This is used to pass traffic through tailscale like a private VPN.
|
|
||||||
- `--hostname=<name>`
|
|
||||||
You can specify a specific hostname for use inside Tailscale (see image below).
|
|
||||||
|
|
||||||
For more Extra Args and their usage please check the [Tailscale Knowledge Base](https://tailscale.com/kb/1080/cli/#up)
|
For more Extra Args and their usage please check the [Tailscale Knowledge Base](https://tailscale.com/kb/1080/cli/#up)
|
||||||
since we consider these advanced features and these may/not be compatible with everyone's exact setup.
|
since we consider these advanced features and these may/not be compatible with everyone's exact setup.
|
||||||
|
|
||||||
|
TODO: Update image with the new fields
|
||||||

|

|
||||||
|
|
||||||
**Hostname example**
|
**Hostname example**
|
||||||
@@ -66,7 +62,7 @@ The default ports are fine for this chart, you shouldn't need to port forward or
|
|||||||
:::caution
|
:::caution
|
||||||
|
|
||||||
In case you want to access their SMB shares or TrueNAS GUI via Tailscale.
|
In case you want to access their SMB shares or TrueNAS GUI via Tailscale.
|
||||||
You will have to ensure that `Host Networking` is enabled.
|
You will have to ensure that `Host Networking` is enabled and `Userspace` is disabled.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|||||||
@@ -18,90 +18,73 @@ questions:
|
|||||||
type: dict
|
type: dict
|
||||||
attrs:
|
attrs:
|
||||||
- variable: authkey
|
- variable: authkey
|
||||||
label: "Auth Key"
|
label: Auth Key
|
||||||
description: "Provide an auth key to automatically authenticate the node as your user account."
|
description: Provide an auth key to automatically authenticate the node as your user account.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
private: true
|
private: true
|
||||||
default: ""
|
default: ""
|
||||||
- variable: userspace
|
- variable: userspace
|
||||||
label: "Userspace"
|
label: Userspace
|
||||||
description: "Userspace Networking mode allows running Tailscale where you don't have access to create a VPN tunnel device."
|
description: Userspace Networking mode allows running Tailscale where you don't have access to create a VPN tunnel device.
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: false
|
||||||
- variable: accept_dns
|
- variable: accept_dns
|
||||||
label: "Accept DNS"
|
label: Accept DNS
|
||||||
description: "Accept DNS configuration from the admin console."
|
description: Accept DNS configuration from the admin console.
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
- variable: routes
|
- variable: routes
|
||||||
label: "Routes"
|
label: Routes
|
||||||
description: Expose physical subnet routes to your entire Tailscale network.
|
description: Expose physical subnet routes to your entire Tailscale network.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
- variable: dest_ip
|
- variable: dest_ip
|
||||||
label: "Dest IP"
|
label: Dest IP
|
||||||
description: Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched.
|
description: Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
- variable: sock5_server
|
- variable: sock5_server
|
||||||
label: "Sock5 Server"
|
label: Sock5 Server
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
|
- variable: hostname
|
||||||
|
label: Hostname
|
||||||
|
description: You can specify a specific hostname for use inside Tailscale. (Passes --hostname HOSTNAME to extra_args)
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
- variable: advertise_as_exit_node
|
||||||
|
label: Advertise as exit node
|
||||||
|
description: This is used to pass traffic through tailscale like a private VPN. (Passes --advertise-exit-node to extra_args)
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
- variable: extra_args
|
- variable: extra_args
|
||||||
label: "Extra Args"
|
label: Extra Args
|
||||||
description: UP_ARGS or flags to pass along to Tailscale, such as --advertise-exit-node
|
description: UP_ARGS or flags to pass along to Tailscale, such as --advertise-exit-node
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
- variable: daemon_extra_args
|
- variable: daemon_extra_args
|
||||||
label: "Tailscale Daemon Extra Args"
|
label: Tailscale Daemon Extra Args
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
# Include{containerConfig}
|
# Include{containerConfig}
|
||||||
# Include{serviceRoot}
|
|
||||||
- variable: main
|
|
||||||
label: "Main Service"
|
|
||||||
description: "The Primary service on which the healthcheck runs, often the webUI"
|
|
||||||
schema:
|
|
||||||
additional_attrs: true
|
|
||||||
type: dict
|
|
||||||
attrs:
|
|
||||||
# Include{serviceSelector}
|
|
||||||
- variable: main
|
|
||||||
label: "Main Service Port Configuration"
|
|
||||||
schema:
|
|
||||||
additional_attrs: true
|
|
||||||
type: dict
|
|
||||||
attrs:
|
|
||||||
- variable: port
|
|
||||||
label: "Port"
|
|
||||||
description: "This port exposes the container port on the service"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 41600
|
|
||||||
required: true
|
|
||||||
# Include{advancedPortUDP}
|
|
||||||
- variable: targetPort
|
|
||||||
label: "Target Port"
|
|
||||||
description: "The internal(!) port on the container the Application runs on"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 41700
|
|
||||||
# Include{serviceExpertRoot}
|
# Include{serviceExpertRoot}
|
||||||
default: false
|
default: true
|
||||||
# Include{serviceExpert}
|
# Include{serviceExpert}
|
||||||
# Include{serviceList}
|
# Include{serviceList}
|
||||||
# Include{persistenceRoot}
|
# Include{persistenceRoot}
|
||||||
- variable: config
|
- variable: config
|
||||||
label: "App Config Storage"
|
label: App Config Storage
|
||||||
description: "Stores the Application Configuration."
|
description: Stores the Application Configuration.
|
||||||
schema:
|
schema:
|
||||||
additional_attrs: true
|
additional_attrs: true
|
||||||
type: dict
|
type: dict
|
||||||
@@ -111,7 +94,7 @@ questions:
|
|||||||
# Include{persistenceList}
|
# Include{persistenceList}
|
||||||
# Include{ingressRoot}
|
# Include{ingressRoot}
|
||||||
- variable: main
|
- variable: main
|
||||||
label: "Main Ingress"
|
label: Main Ingress
|
||||||
schema:
|
schema:
|
||||||
additional_attrs: true
|
additional_attrs: true
|
||||||
type: dict
|
type: dict
|
||||||
@@ -124,42 +107,42 @@ questions:
|
|||||||
# Include{security}
|
# Include{security}
|
||||||
# Include{securityContextAdvancedRoot}
|
# Include{securityContextAdvancedRoot}
|
||||||
- variable: privileged
|
- variable: privileged
|
||||||
label: "Privileged mode"
|
label: Privileged mode
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
- variable: readOnlyRootFilesystem
|
- variable: readOnlyRootFilesystem
|
||||||
label: "ReadOnly Root Filesystem"
|
label: ReadOnly Root Filesystem
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
- variable: allowPrivilegeEscalation
|
- variable: allowPrivilegeEscalation
|
||||||
label: "Allow Privilege Escalation"
|
label: Allow Privilege Escalation
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
- variable: runAsNonRoot
|
- variable: runAsNonRoot
|
||||||
label: "runAsNonRoot"
|
label: runAsNonRoot
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
# Include{securityContextAdvanced}
|
# Include{securityContextAdvanced}
|
||||||
# Include{podSecurityContextRoot}
|
# Include{podSecurityContextRoot}
|
||||||
- variable: runAsUser
|
- variable: runAsUser
|
||||||
label: "runAsUser"
|
label: runAsUser
|
||||||
description: "The UserID of the user running the application"
|
description: The UserID of the user running the application
|
||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 0
|
default: 0
|
||||||
- variable: runAsGroup
|
- variable: runAsGroup
|
||||||
label: "runAsGroup"
|
label: runAsGroup
|
||||||
description: "The groupID this App of the user running the application"
|
description: The groupID this App of the user running the application
|
||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 0
|
default: 0
|
||||||
- variable: fsGroup
|
- variable: fsGroup
|
||||||
label: "fsGroup"
|
label: fsGroup
|
||||||
description: "The group that should own ALL storage."
|
description: The group that should own ALL storage.
|
||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
|
|||||||
@@ -4,6 +4,19 @@
|
|||||||
{{- $configName := printf "%s-tailscale-config" (include "tc.common.names.fullname" .) }}
|
{{- $configName := printf "%s-tailscale-config" (include "tc.common.names.fullname" .) }}
|
||||||
{{- $secretName := printf "%s-tailscale-secret" (include "tc.common.names.fullname" .) }}
|
{{- $secretName := printf "%s-tailscale-secret" (include "tc.common.names.fullname" .) }}
|
||||||
|
|
||||||
|
{{- $customArgs := "" -}}
|
||||||
|
|
||||||
|
{{- if .Values.tailscale.hostname }}
|
||||||
|
{{- $customArgs = (printf "--hostname %v %v" .Values.tailscale.hostname $customArgs | trim) -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.tailscale.advertise_as_exit_node }}
|
||||||
|
{{- $customArgs = (printf "--advertise-exit-node %v" $customArgs | trim) -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.tailscale.extra_args }}
|
||||||
|
{{- $customArgs = (printf "%v %v" .Values.tailscale.extra_args $customArgs | trim) -}}
|
||||||
|
{{- end }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
@@ -24,10 +37,10 @@ data:
|
|||||||
{{- with .Values.tailscale.sock5_server }}
|
{{- with .Values.tailscale.sock5_server }}
|
||||||
TS_SOCK5_SERVER: {{ . }}
|
TS_SOCK5_SERVER: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.tailscale.extra_args }}
|
|
||||||
TS_EXTRA_ARGS: {{ . | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.tailscale.daemon_extra_args }}
|
{{- with .Values.tailscale.daemon_extra_args }}
|
||||||
TS_TAILSCALED_EXTRA_ARGS: {{ . | quote }}
|
TS_TAILSCALED_EXTRA_ARGS: {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with $customArgs }}
|
||||||
|
TS_EXTRA_ARGS: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -50,13 +50,15 @@ envFrom:
|
|||||||
|
|
||||||
tailscale:
|
tailscale:
|
||||||
authkey: "supersecret"
|
authkey: "supersecret"
|
||||||
userspace: true
|
userspace: false
|
||||||
accept_dns: false
|
accept_dns: false
|
||||||
routes: ""
|
routes: ""
|
||||||
dest_ip: ""
|
dest_ip: ""
|
||||||
sock5_server: ""
|
sock5_server: ""
|
||||||
extra_args: ""
|
extra_args: ""
|
||||||
daemon_extra_args: ""
|
daemon_extra_args: ""
|
||||||
|
hostname: ""
|
||||||
|
advertise_as_exit_node: false
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
@@ -66,12 +68,14 @@ probes:
|
|||||||
startup:
|
startup:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
hostNetwork: true
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
|
enabled: false
|
||||||
ports:
|
ports:
|
||||||
main:
|
main:
|
||||||
protocol: UDP
|
enabled: false
|
||||||
port: 41700
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
varrun:
|
varrun:
|
||||||
|
|||||||
Reference in New Issue
Block a user