File tree Expand file tree Collapse file tree 5 files changed +87
-2
lines changed
Expand file tree Collapse file tree 5 files changed +87
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22name : k8s-dev-pod
33description : A Helm chart for deploying a dev environment inside a K8S cluster that is compatible with Visual Studio Code remote targets
44type : application
5- version : 0.1.10
5+ version : 0.2.0
66appVersion : " 0.1.0"
77maintainers :
88 - name : Bryopsida
Original file line number Diff line number Diff line change 11# k8s-dev-pod
22
3- ![ Version: 0.1.10 ] ( https://img.shields.io/badge/Version-0.1.10 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.1.0] ( https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square )
3+ ![ Version: 0.2.0 ] ( https://img.shields.io/badge/Version-0.2.0 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.1.0] ( https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square )
44
55A Helm chart for deploying a dev environment inside a K8S cluster that is compatible with Visual Studio Code remote targets
66
@@ -21,6 +21,11 @@ A Helm chart for deploying a dev environment inside a K8S cluster that is compat
2121| ingressEnabled | bool | ` false ` | |
2222| ingressPort | int | ` 3022 ` | |
2323| passwordLoginEnabled | bool | ` true ` | |
24+ | tailscale.authKey | string | ` nil ` | |
25+ | tailscale.enabled | bool | ` false ` | |
26+ | tailscale.image.pullPolicy | string | ` "Always" ` | |
27+ | tailscale.image.repo | string | ` "ghcr.io/tailscale/tailscale" ` | |
28+ | tailscale.image.tag | string | ` "latest" ` | |
2429
2530----------------------------------------------
2631Autogenerated from chart metadata using [ helm-docs v1.11.0] ( https://github.com/norwoodj/helm-docs/releases/v1.11.0 )
Original file line number Diff line number Diff line change 3434 {{- if .Values.volumes }}
3535 {{- toYaml .Values.volumes | nindent 8 }}
3636 {{- end }}
37+ {{- if .Values.tailscale.enabled }}
38+ serviceAccountName : " tailscale-sa"
39+ {{- end }}
3740 containers :
3841 - name : {{ .Chart.Name }}
3942 securityContext :
6265 {{- if .Values.volumeMounts }}
6366 {{- toYaml .Values.volumeMounts | nindent 12 }}
6467 {{- end }}
68+ {{- if .Values.tailscale.enabled }}
69+ - name : tailscale
70+ image : " {{ .Values.tailscale.image.repo }}:{{ .Values.tailscale.image.tag }}"
71+ imagePullPolicy : " {{ .Values.tailscale.image.pullPolicy }}"
72+ securityContext :
73+ runAsUser : 1000
74+ runAsGroup : 1000
75+ env :
76+ # Store the state in a k8s secret
77+ - name : TS_KUBE_SECRET
78+ value : " tailscale-state"
79+ - name : TS_USERSPACE
80+ value : " true"
81+ - name : TS_AUTHKEY
82+ valueFrom :
83+ secretKeyRef :
84+ name : tailscale-auth
85+ key : TS_AUTHKEY
86+ optional : true
87+ {{- end }}
6588 {{- with .Values.nodeSelector }}
6689 nodeSelector :
6790 {{- toYaml . | nindent 8 }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.tailscale.enabled }}
2+ ---
3+ apiVersion : v1
4+ kind : ServiceAccount
5+ metadata :
6+ name : tailscale-sa
7+ namespace : {{ .Release.Namespace }}
8+ ---
9+ apiVersion : rbac.authorization.k8s.io/v1
10+ kind : RoleBinding
11+ metadata :
12+ name : tailscale
13+ subjects :
14+ - kind : ServiceAccount
15+ name : " tailscale-sa"
16+ roleRef :
17+ kind : Role
18+ name : tailscale
19+ apiGroup : rbac.authorization.k8s.io
20+ ---
21+ apiVersion : rbac.authorization.k8s.io/v1
22+ kind : Role
23+ metadata :
24+ name : tailscale
25+ namespace : {{ .Release.Namespace }}
26+ rules :
27+ - apiGroups : [""] # "" indicates the core API group
28+ resources : ["secrets"]
29+ # Create can not be restricted to a resource name.
30+ verbs : ["create"]
31+ - apiGroups : [""] # "" indicates the core API group
32+ resourceNames : ["tailscale-state"]
33+ resources : ["secrets"]
34+ verbs : ["get", "update", "patch"]
35+ ---
36+ apiVersion : v1
37+ kind : Secret
38+ metadata :
39+ name : tailscale-state
40+ namespace : {{ .Release.Namespace}}
41+ data :
42+ ---
43+ apiVersion : v1
44+ kind : Secret
45+ metadata :
46+ name : tailscale-auth
47+ namespace : {{ .Release.Namespace}}
48+ data :
49+ TS_AUTHKEY : {{ (required "When tailscale.enabled is true, a value must be provided for tailscale.authKey!" .Values.tailscale.authKey) | b64enc }}
50+ {{- end }}
Original file line number Diff line number Diff line change @@ -6,3 +6,10 @@ homeSize: 20
66ingressEnabled : false
77ingressPort : 3022
88passwordLoginEnabled : true
9+ tailscale :
10+ enabled : false
11+ image :
12+ repo : ghcr.io/tailscale/tailscale
13+ tag : latest
14+ pullPolicy : Always
15+ authKey : ~
You can’t perform that action at this time.
0 commit comments