add headscale
This commit is contained in:
parent
7049403d60
commit
83fdbedd56
17
infrastructure/headscale/ingress.yaml
Normal file
17
infrastructure/headscale/ingress.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: headscale-ingressroute
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`headscale.kluster.moll.re`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: headscale-web
|
||||
port: 8080
|
||||
|
||||
tls:
|
||||
certResolver: default-tls
|
22
infrastructure/headscale/kustomization.yaml
Normal file
22
infrastructure/headscale/kustomization.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: headscale
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- headscale-config.configmap.yaml
|
||||
- headplane-config.configmap.yaml
|
||||
- pvc.yaml
|
||||
- deployment.yaml
|
||||
- serviceaccount.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
|
||||
images:
|
||||
- name: headscale
|
||||
newName: headscale/headscale # has all plugins
|
||||
newTag: v0.25.1
|
||||
- name: headplane
|
||||
newName: ghcr.io/tale/headplane
|
||||
newTag: "0.5.10"
|
6
infrastructure/headscale/namespace.yaml
Normal file
6
infrastructure/headscale/namespace.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: placeholder
|
||||
labels:
|
||||
pod-security.kubernetes.io/enforce: privileged
|
23
infrastructure/headscale/pvc.yaml
Normal file
23
infrastructure/headscale/pvc.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: headscale-data
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: headplane-data
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
10
infrastructure/headscale/service.yaml
Normal file
10
infrastructure/headscale/service.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: headscale-web
|
||||
spec:
|
||||
selector:
|
||||
app: headscale
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
26
infrastructure/headscale/serviceaccount.yaml
Normal file
26
infrastructure/headscale/serviceaccount.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: headplane-agent
|
||||
# namespace: default # Adjust namespace as needed
|
||||
rules:
|
||||
- apiGroups: ['']
|
||||
resources: ['pods']
|
||||
verbs: ['get', 'list']
|
||||
- apiGroups: ['apps']
|
||||
resources: ['deployments']
|
||||
verbs: ['get', 'list']
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: headplane-agent
|
||||
# namespace: default # Adjust namespace as needed
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: headplane-agent
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default # If you use a different service account, change this
|
||||
# namespace: default # Adjust namespace as needed
|
Loading…
x
Reference in New Issue
Block a user