apiVersion: apps/v1 kind: Deployment metadata: name: headscale namespace: {{ .namespace }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: component: server template: metadata: labels: component: server spec: securityContext: runAsNonRoot: false runAsUser: 0 seccompProfile: type: RuntimeDefault containers: - name: headscale image: headscale/headscale:v0.29.1 args: ["serve"] ports: - name: http containerPort: 8080 protocol: TCP - name: grpc containerPort: 50443 protocol: TCP resources: limits: cpu: 500m memory: 256Mi requests: cpu: 50m memory: 128Mi volumeMounts: - name: headscale-config mountPath: /etc/headscale - name: headscale-data mountPath: /var/lib/headscale livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 30 failureThreshold: 3 readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 10 failureThreshold: 3 securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL readOnlyRootFilesystem: false volumes: - name: headscale-config configMap: name: headscale-config - name: headscale-data persistentVolumeClaim: claimName: headscale-data restartPolicy: Always