update
diff --git a/charts/tailscale-proxy/.helmignore b/charts/tailscale-proxy/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/charts/tailscale-proxy/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/charts/tailscale-proxy/Chart.yaml b/charts/tailscale-proxy/Chart.yaml
new file mode 100644
index 0000000..a87d9d7
--- /dev/null
+++ b/charts/tailscale-proxy/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: tailscale-proxy
+description: A Helm chart to run tailscale node
+type: application
+version: 0.0.1
+appVersion: "0.0.1"
diff --git a/charts/tailscale-proxy/templates/install.yaml b/charts/tailscale-proxy/templates/install.yaml
new file mode 100644
index 0000000..76241da
--- /dev/null
+++ b/charts/tailscale-proxy/templates/install.yaml
@@ -0,0 +1,97 @@
+# apiVersion: v1
+# kind: PersistentVolumeClaim
+# metadata:
+# name: tailscale
+# namespace: {{ .Release.Namespace }}
+# annotations:
+# helm.sh/resource-policy: keep
+# spec:
+# accessModes:
+# - ReadWriteOnce
+# resources:
+# requests:
+# storage: 1Gi
+---
+apiVersion: headscale.dodo.cloud/v1
+kind: HeadscaleUser
+metadata:
+ name: {{ .Values.username }}
+ namespace: {{ .Release.Namespace }}
+spec:
+ headscaleAddress: {{ .Values.apiServer }}
+ name: {{ .Values.username }}
+ preAuthKey:
+ enabled: true
+ secretName: {{ .Values.preAuthKeySecret }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: tailscale
+ namespace: {{ .Release.Namespace }}
+spec:
+ selector:
+ matchLabels:
+ app: tailscale
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: tailscale
+ spec:
+ # volumes:
+ # - name: tailscale
+ # persistentVolumeClaim:
+ # claimName: tailscale
+ containers:
+ - name: tailscale
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ securityContext:
+ privileged: true
+ capabilities:
+ add:
+ - NET_ADMIN
+ env:
+ - name: TS_KUBE_SECRET
+ value: {{ .Values.preAuthKeySecret }}
+ # - name: TS_STATE_DIR
+ # value: /tailscale-state
+ # - name: TS_AUTHKEY
+ # valueFrom:
+ # secretKeyRef:
+ # name: {{ .Values.preAuthKeySecret }}
+ # key: key
+ - name: TS_HOSTNAME
+ value: {{ .Values.hostname }}
+ - name: TS_ROUTES
+ value: {{ .Values.ipSubnet }}
+ - name: TS_EXTRA_ARGS
+ value: --login-server={{ .Values.loginServer }}
+ # volumeMounts:
+ # - name: tailscale
+ # mountPath: /tailscale-state
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ name: secrets
+ namespace: {{ .Release.Namespace }}
+rules:
+- apiGroups: [""]
+ resources: ["secrets"]
+ verbs: ["get", "watch", "list", "patch", "update"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: secrets
+ namespace: {{ .Release.Namespace }}
+subjects:
+- kind: ServiceAccount
+ name: default
+ namespace: {{ .Release.Namespace }}
+roleRef:
+ kind: Role
+ name: secrets
+ apiGroup: rbac.authorization.k8s.io
diff --git a/charts/tailscale-proxy/values.yaml b/charts/tailscale-proxy/values.yaml
new file mode 100644
index 0000000..82a6928
--- /dev/null
+++ b/charts/tailscale-proxy/values.yaml
@@ -0,0 +1,10 @@
+image:
+ repository: tailscale/tailscale
+ tag: v1.42.0
+ pullPolicy: IfNotPresent
+username: example
+hostname: example-ingress
+apiServer: http://headscale-api.example-app-headscale.svc.cluster.local
+loginServer: https://headscale.example.com
+ipSubnet: 10.1.0.1/24
+preAuthKeySecret: example-key