Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage nodeAffinity rather than nodeSelector to target Control Plane nodes #2803

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions manifests/vanilla/validatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,19 @@ spec:
role: vsphere-csi-webhook
spec:
serviceAccountName: vsphere-csi-webhook
nodeSelector:
node-role.kubernetes.io/control-plane: ""
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
vdkotkar marked this conversation as resolved.
Show resolved Hide resolved
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/controlplane
chethanv28 marked this conversation as resolved.
Show resolved Hide resolved
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
Expand Down
14 changes: 12 additions & 2 deletions manifests/vanilla/vsphere-csi-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,19 @@ spec:
values:
- vsphere-csi-controller
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
vdkotkar marked this conversation as resolved.
Show resolved Hide resolved
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/controlplane
vdkotkar marked this conversation as resolved.
Show resolved Hide resolved
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
serviceAccountName: vsphere-csi-controller
nodeSelector:
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
Expand Down