fix(tailscale): switch to the new golang binary (#4307)

* fix(tailscale): switch to the new golang binary

* temp, let CI  install tailscale

* test without secret

* change key name in secret

* change socket to varrun, which is the default that `tailscale` command looks for

* test with varrun enabled

* remove tty

* don't try to install TS

* dont load authkey as env

* update vpn template

* remove /var/lib as it now uses kubesecret for the state

* bump
This commit is contained in:
Stavros Kois
2022-11-05 20:24:36 +02:00
committed by GitHub
parent 2edc8498e2
commit e1224804c3
7 changed files with 47 additions and 29 deletions
+1 -1
View File
@@ -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.1.20 version: 1.1.21
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- network - network
+15 -12
View File
@@ -11,8 +11,8 @@ questions:
# Include{controllerExpert} # Include{controllerExpert}
# Include{controllerExpertExtraArgs} # Include{controllerExpertExtraArgs}
- variable: tailscale - variable: tailscale
group: "Container Configuration" group: Container Configuration
label: "Tailscale Configuration" label: Tailscale Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -24,6 +24,12 @@ questions:
type: string type: string
private: true private: true
default: "" default: ""
- variable: auth_once
label: Auth Once
description: Only attempt to log in if not already logged in.
schema:
type: boolean
default: true
- 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. *Required for Exit Node/Accessing Local Routes* See <a href="https://truecharts.org/docs/charts/stable/tailscale/How-To-Guide/">How-To-Guide</a> for more info description: Userspace Networking mode allows running Tailscale where you don't have access to create a VPN tunnel device. *Required for Exit Node/Accessing Local Routes* See <a href="https://truecharts.org/docs/charts/stable/tailscale/How-To-Guide/">How-To-Guide</a> for more info
@@ -50,6 +56,13 @@ questions:
default: "" default: ""
- variable: sock5_server - variable: sock5_server
label: Sock5 Server label: Sock5 Server
description: The address on which to listen for SOCKS5 proxying into the tailscale net.
schema:
type: string
default: ""
- variable: outbound_http_proxy_listen
label: Outbound HTTP Proxy Listen
description: The address on which to listen for HTTP proxying into the tailscale net.
schema: schema:
type: string type: string
default: "" default: ""
@@ -81,16 +94,6 @@ questions:
default: true default: true
# Include{serviceExpert} # Include{serviceExpert}
# Include{serviceList} # Include{serviceList}
# Include{persistenceRoot}
- variable: config
label: App Config Storage
description: Stores the Application Configuration.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceAdvanced}
# Include{persistenceList} # Include{persistenceList}
# Include{ingressRoot} # Include{ingressRoot}
- variable: main - variable: main
@@ -26,8 +26,10 @@ metadata:
{{- include "tc.common.labels" . | nindent 4 }} {{- include "tc.common.labels" . | nindent 4 }}
data: data:
TS_KUBE_SECRET: {{ $secretName | squote }} TS_KUBE_SECRET: {{ $secretName | squote }}
TS_SOCKET: /var/run/tailscale/tailscaled.sock
TS_USERSPACE: {{ .Values.tailscale.userspace | quote }} TS_USERSPACE: {{ .Values.tailscale.userspace | quote }}
TS_ACCEPT_DNS: {{ .Values.tailscale.accept_dns | quote }} TS_ACCEPT_DNS: {{ .Values.tailscale.accept_dns | quote }}
TS_AUTH_ONCE: {{ .Values.tailscale.auth_once | quote }}
{{- with .Values.tailscale.routes }} {{- with .Values.tailscale.routes }}
TS_ROUTES: {{ . }} TS_ROUTES: {{ . }}
{{- end }} {{- end }}
@@ -43,4 +45,7 @@ data:
{{- with $customArgs }} {{- with $customArgs }}
TS_EXTRA_ARGS: {{ . | quote }} TS_EXTRA_ARGS: {{ . | quote }}
{{- end }} {{- end }}
{{- with .Values.tailscale.outbound_http_proxy_listen }}
TS_OUTBOUND_HTTP_PROXY_LISTEN: {{ . | quote }}
{{- end }}
{{- end }} {{- end }}
@@ -14,6 +14,7 @@ metadata:
{{- include "tc.common.labels" . | nindent 4 }} {{- include "tc.common.labels" . | nindent 4 }}
data: data:
{{- with .Values.tailscale.authkey }} {{- with .Values.tailscale.authkey }}
TS_AUTH_KEY: {{ . | b64enc }} {{/* Name of the authkey is crucial, don't change it */}}
authkey: {{ . | b64enc }}
{{- end }} {{- end }}
{{- end }} {{- end }}
+10 -14
View File
@@ -3,9 +3,8 @@ image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: v1.33.141@sha256:726ff19a7be12e9b88fd582edea075020833ebe707751194ee5dc82583a330e6 tag: v1.33.141@sha256:726ff19a7be12e9b88fd582edea075020833ebe707751194ee5dc82583a330e6
command: ["ash", "/tailscale/run.sh"] command:
- /usr/local/bin/containerboot
tty: true
securityContext: securityContext:
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
@@ -29,32 +28,32 @@ rbac:
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
- "secrets" - secrets
verbs: verbs:
- "create" - create
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
- "secrets" - secrets
resourceNames: resourceNames:
- '{{ printf "%s-tailscale-secret" (include "tc.common.names.fullname" .) }}' - '{{ printf "%s-tailscale-secret" (include "tc.common.names.fullname" .) }}'
verbs: verbs:
- "get" - get
- "update" - update
envFrom: envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-tailscale-secret'
- configMapRef: - configMapRef:
name: '{{ include "tc.common.names.fullname" . }}-tailscale-config' name: '{{ include "tc.common.names.fullname" . }}-tailscale-config'
tailscale: tailscale:
authkey: "supersecret" authkey: supersecret
auth_once: true
userspace: true userspace: true
accept_dns: false accept_dns: false
routes: "" routes: ""
dest_ip: "" dest_ip: ""
sock5_server: "" sock5_server: ""
outbound_http_proxy_listen: ""
extra_args: "" extra_args: ""
daemon_extra_args: "" daemon_extra_args: ""
hostname: "" hostname: ""
@@ -79,10 +78,7 @@ service:
persistence: persistence:
varrun: varrun:
enabled: false
config:
enabled: true enabled: true
mountPath: "/var/lib"
tun: tun:
enabled: true enabled: true
type: hostPath type: hostPath
+1
View File
@@ -191,6 +191,7 @@ words:
- proto - proto
- proxyhttp - proxyhttp
- proxyhttps - proxyhttps
- proxying
- proxymetrics - proxymetrics
- puid - puid
- putregexhere - putregexhere
+13 -1
View File
@@ -50,6 +50,12 @@
type: string type: string
private: true private: true
default: "" default: ""
- variable: auth_once
label: Auth Once
description: Only attempt to log in if not already logged in.
schema:
type: boolean
default: true
- 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.
@@ -76,7 +82,13 @@
default: "" default: ""
- variable: sock5_server - variable: sock5_server
label: Sock5 Server label: Sock5 Server
description: Sock5 Server description: The address on which to listen for SOCKS5 proxying into the tailscale net.
schema:
type: string
default: ""
- variable: outbound_http_proxy_listen
label: Outbound HTTP Proxy Listen
description: The address on which to listen for HTTP proxying into the tailscale net.
schema: schema:
type: string type: string
default: "" default: ""