fix: make the affinity rule strict for tailscale (#1606)

fix: requires tailscale and headscale to run on the same node

Co-authored-by: 0x7fffff92 <0x7fffff92@example.com>
This commit is contained in:
0x7fffff92 2025-07-24 00:52:11 +08:00 committed by GitHub
parent 8be967ebf3
commit eb774e6e06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -260,13 +260,11 @@ spec:
spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: headscale
topologyKey: kubernetes.io/hostname
weight: 100
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: headscale
topologyKey: kubernetes.io/hostname
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers: