Skip to content

Commit

Permalink
Merge pull request #806 from EmilienM/nodeAffinity
Browse files Browse the repository at this point in the history
deploy: relax Operator node affinity
  • Loading branch information
SchSeba authored Nov 20, 2024
2 parents 623c339 + 8950f76 commit 5fce462
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ spec:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
# In the context of Hypershift, the SR-IOV network
# Operator is deployed on Nodepools which are labeled
# as workers. So we relax the node affinity to prefer
# masters/control-plane when possible otherwise we
# schedule where it's possible.
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: "node-role.kubernetes.io/master"
operator: Exists
- weight: 1
preference:
matchExpressions:
- key: "node-role.kubernetes.io/control-plane"
operator: Exists
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
Expand Down

0 comments on commit 5fce462

Please sign in to comment.