Browse Source

vsphere-csi: add nodeAffinity to daemonset (#9293)

pull/9298/head
pingrulkin 2 years ago
committed by GitHub
parent
commit
a2e23c1a71
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions
  1. 2
      roles/kubernetes-apps/csi_driver/vsphere/defaults/main.yml
  2. 4
      roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-node.yml.j2

2
roles/kubernetes-apps/csi_driver/vsphere/defaults/main.yml

@ -24,6 +24,8 @@ vsphere_csi_aggressive_node_drain: False
vsphere_csi_aggressive_node_unreachable_timeout: 300
vsphere_csi_aggressive_node_not_ready_timeout: 300
vsphere_csi_node_affinity: {}
# If this is true, debug information will be displayed but
# may contain some private data, so it is recommended to set it to false
# in the production environment.

4
roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-node.yml.j2

@ -19,6 +19,10 @@ spec:
spec:
nodeSelector:
kubernetes.io/os: linux
{% if vsphere_csi_node_affinity %}
affinity:
{{ vsphere_csi_node_affinity | to_nice_yaml | indent(width=8) }}
{% endif %}
serviceAccountName: vsphere-csi-node
hostNetwork: true
dnsPolicy: "ClusterFirstWithHostNet"

Loading…
Cancel
Save