diff --git a/charts/latest/csi-driver-nfs/templates/csi-nfs-node.yaml b/charts/latest/csi-driver-nfs/templates/csi-nfs-node.yaml index 375da2431..bc23f7d7b 100644 --- a/charts/latest/csi-driver-nfs/templates/csi-nfs-node.yaml +++ b/charts/latest/csi-driver-nfs/templates/csi-nfs-node.yaml @@ -17,6 +17,8 @@ spec: spec: hostNetwork: true # original nfs connection would be broken without hostNetwork setting dnsPolicy: ClusterFirstWithHostNet + nodeSelector: + kubernetes.io/os: linux containers: - name: liveness-probe image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" diff --git a/deploy/csi-nfs-node.yaml b/deploy/csi-nfs-node.yaml index 3a9ed74a7..2cd3323b7 100644 --- a/deploy/csi-nfs-node.yaml +++ b/deploy/csi-nfs-node.yaml @@ -17,6 +17,8 @@ spec: spec: hostNetwork: true # original nfs connection would be broken without hostNetwork setting dnsPolicy: ClusterFirstWithHostNet + nodeSelector: + kubernetes.io/os: linux containers: - name: liveness-probe image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0 diff --git a/deploy/example/deployment.yaml b/deploy/example/deployment.yaml index 2f497a079..4df5180a5 100644 --- a/deploy/example/deployment.yaml +++ b/deploy/example/deployment.yaml @@ -26,7 +26,8 @@ spec: labels: name: deployment-nfs spec: - containers: + nodeSelector: + "kubernetes.io/os": linux containers: - name: deployment-nfs image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine diff --git a/test/e2e/testsuites/testsuites.go b/test/e2e/testsuites/testsuites.go index c4667e7b7..68407cfd5 100644 --- a/test/e2e/testsuites/testsuites.go +++ b/test/e2e/testsuites/testsuites.go @@ -323,6 +323,7 @@ func NewTestPod(c clientset.Interface, ns *v1.Namespace, command string) *TestPo GenerateName: "nfs-volume-tester-", }, Spec: v1.PodSpec{ + NodeSelector: map[string]string{"kubernetes.io/os": "linux"}, Containers: []v1.Container{ { Name: "volume-tester", @@ -446,6 +447,7 @@ func NewTestDeployment(c clientset.Interface, ns *v1.Namespace, command string, Labels: map[string]string{"app": selectorValue}, }, Spec: v1.PodSpec{ + NodeSelector: map[string]string{"kubernetes.io/os": "linux"}, Containers: []v1.Container{ { Name: "volume-tester",