Skip to content

Commit

Permalink
Update affinity rules to match guest cluster usage
Browse files Browse the repository at this point in the history
These are the same as the cloud provider affinity rules

Signed-off-by: Ivan Sim <[email protected]>
  • Loading branch information
ihcsim authored and bk201 committed Jan 15, 2025
1 parent bef0bf0 commit 9d50904
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions charts/harvester-csi-driver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,14 @@ spec:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
# For RKE1
- matchExpressions:
- key: node-role.kubernetes.io/controlplane
operator: Exists
# For RKE2
- matchExpressions:
- key: node-role.harvesterhci.io/worker
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: In
values: ["true"]
- weight: 100
preference:
matchExpressions:
- key: node-role.harvesterhci.io/management
operator: In
values: ["true"]
operator: Exists
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand All @@ -116,7 +108,7 @@ spec:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values: [{{ template "harvester-csi-driver.name" . }}]
values: [harvester-csi-driver]
- key: component
operator: In
values: [csi-controllers]
Expand Down

0 comments on commit 9d50904

Please sign in to comment.