2025-04-24 22:52:22 +02:00

78 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: headscale
labels:
app: headscale
spec:
selector:
matchLabels:
app: headscale
replicas: 1
template:
metadata:
labels:
app: headscale
spec:
shareProcessNamespace: true
serviceAccountName: default
containers:
- name: headplane
image: headplane
env:
# Set these if the pod name for Headscale is not static
# We will use the downward API to get the pod name instead
- name: HEADPLANE_LOAD_ENV_OVERRIDES
value: 'true'
- name: 'HEADPLANE_INTEGRATION__KUBERNETES__POD_NAME'
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- containerPort: 3000
volumeMounts:
- name: headscale-config
mountPath: /etc/headscale/config.yaml
subPath: config.yaml
- name: headplane-config
mountPath: /etc/headplane/config.yaml
subPath: config.yaml
- name: headplane-data
mountPath: /var/lib/headplane
- name: headscale
image: headscale
args: ["serve"]
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 100m
memory: 100Mi
# env:
ports:
- containerPort: 8080
volumeMounts:
- name: headscale-config
mountPath: /etc/headscale/config.yaml
subPath: config.yaml
- mountPath: /persistence
name: headscale-data
terminationGracePeriodSeconds: 30
volumes:
- name: headscale-config
configMap:
name: headscale-config
- name: headscale-data
persistentVolumeClaim:
claimName: headscale-data
- name: headplane-config
configMap:
name: headplane-config
- name: headplane-data
persistentVolumeClaim:
claimName: headplane-data