mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-22 21:14:50 +07:00
feat: install Tailscale
This commit is contained in:
parent
0d556a6df1
commit
eb88f5c306
7
apps/tailscale/Chart.yaml
Normal file
7
apps/tailscale/Chart.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: tailscale
|
||||||
|
version: 0.0.0
|
||||||
|
dependencies:
|
||||||
|
- name: app-template
|
||||||
|
version: 3.1.0
|
||||||
|
repository: https://bjw-s.github.io/helm-charts
|
16
apps/tailscale/templates/role.yaml
Normal file
16
apps/tailscale/templates/role.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# https://github.com/tailscale/tailscale/blob/main/docs/k8s/role.yaml
|
||||||
|
# Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: tailscale
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["secrets"]
|
||||||
|
verbs: ["create"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resourceNames: ["tailscale"]
|
||||||
|
resources: ["secrets"]
|
||||||
|
verbs: ["get", "update", "patch"]
|
15
apps/tailscale/templates/rolebinding.yaml
Normal file
15
apps/tailscale/templates/rolebinding.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# https://github.com/tailscale/tailscale/blob/main/docs/k8s/rolebinding.yaml
|
||||||
|
# Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: tailscale
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: tailscale
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: tailscale
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
14
apps/tailscale/templates/secret.yaml
Normal file
14
apps/tailscale/templates/secret.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: tailscale-auth
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: global-secrets
|
||||||
|
data:
|
||||||
|
- secretKey: TS_AUTHKEY
|
||||||
|
remoteRef:
|
||||||
|
key: external
|
||||||
|
property: tailscale-auth-key
|
8
apps/tailscale/templates/serviceaccount.yaml
Normal file
8
apps/tailscale/templates/serviceaccount.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# https://github.com/tailscale/tailscale/blob/main/docs/k8s/sa.yaml
|
||||||
|
# Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: tailscale
|
||||||
|
namespace: {{ .Release.Namespace }}
|
24
apps/tailscale/values.yaml
Normal file
24
apps/tailscale/values.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
app-template:
|
||||||
|
serviceAccount:
|
||||||
|
name: tailscale
|
||||||
|
controllers:
|
||||||
|
tailscale:
|
||||||
|
containers:
|
||||||
|
app:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/tailscale/tailscale
|
||||||
|
tag: latest
|
||||||
|
env:
|
||||||
|
TS_HOSTNAME: homelab-router
|
||||||
|
TS_USERSPACE: false
|
||||||
|
TS_KUBE_SECRET: tailscale
|
||||||
|
TS_ROUTES: 192.168.1.224/27
|
||||||
|
TS_AUTHKEY:
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: tailscale-auth
|
||||||
|
key: TS_AUTHKEY
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_ADMIN
|
Loading…
Reference in New Issue
Block a user