File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed
Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ headscale
4949https://{{- required " .Values.headscale.domain is required" .Values.headscale.domain }}
5050{{- end }}
5151
52+ {{- define " tailscale.loginServer" }}
53+ {{- if .Values.headscale.create }}
54+ {{- include " headscale.host" . }}
55+ {{- else }}
56+ {{- required " .Values.tailscale.loginServer is required" .Values.tailscale.loginServer }}
57+ {{- end }}
58+ {{- end }}
59+
5260{{- define " postgres.name" -}}
5361postgres
5462{{- end }}
Original file line number Diff line number Diff line change 3030 labels :
3131 app : {{ include "redis.name" . }}
3232 spec :
33+ hostNetwork : true
34+ dnsPolicy : ClusterFirstWithHostNet
3335 containers :
36+ - name : tailscale
37+ image : tailscale/tailscale:latest
38+ env :
39+ - name : TS_STATE_DIR
40+ value : /var/lib/tailscale
41+ - name : TS_USERSPACE
42+ value : " true"
43+ - name : TS_AUTH_KEY
44+ valueFrom :
45+ secretKeyRef :
46+ name : {{ .Values.tailscale.secret.name }}
47+ key : {{ .Values.tailscale.secret.keys.authKey }}
48+ - name : TS_EXTRA_ARGS
49+ value : --login-server {{ include "tailscale.loginServer" . }}
50+ volumeMounts :
51+ - name : dev-net-tun
52+ mountPath : /dev/net/tun
53+ securityContext :
54+ capabilities :
55+ add :
56+ - NET_ADMIN
57+ - NET_RAW
3458 - name : redis
3559 image : " redis:{{ .Values.redis.imageTag }}"
3660 command :
4771 key : {{ .Values.redis.secret.keys.password }}
4872 ports :
4973 - containerPort : 6379
74+ volumes :
75+ - name : dev-net-tun
76+ hostPath :
77+ path : /dev/net/tun
78+ type : CharDevice
5079---
5180apiVersion : v1
5281kind : Service
Original file line number Diff line number Diff line change @@ -56,8 +56,6 @@ tailscale:
5656 # -- Name of the secret with the Redis connection string and password.
5757 name : " tailscale-secret"
5858 keys :
59- # -- The key in the secret containing the Tailscale host.
60- loginServer : " LOGIN_SERVER"
6159 # -- The key in the secret containing the Tailscale API key
6260 apiKey : " API_KEY"
6361 # -- The key in the secret containing the Tailscale auth key
You can’t perform that action at this time.
0 commit comments