Skip to content

Commit

Permalink
Use "preferred" podAntiAffinity instead of "required" for controller pod
Browse files Browse the repository at this point in the history
This required to avoid problems with RollingUpdate on the
single node cluster.

Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
  • Loading branch information
ykulazhenkov committed Aug 7, 2023
1 parent d45ca3f commit 3149c68
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions deploy/nv-ipam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,16 @@ spec:
serviceAccountName: nv-ipam-controller
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: name
operator: In
values:
- nv-ipam-controller
topologyKey: "kubernetes.io/hostname"
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: name
operator: In
values:
- nv-ipam-controller
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
Expand Down

0 comments on commit 3149c68

Please sign in to comment.