diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index 2d7076c11c..bb11510f9e 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -90,7 +90,16 @@ fullnameOverride: controller: # If arbitrary args like "--aws-sdk-debug-log=true" need to be passed, use this value additionalArgs: [] - affinity: {} + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: eks.amazonaws.com/compute-type + operator: NotIn + values: + - fargate # The default filesystem type of the volume to provision when fstype is unspecified in the StorageClass. # If the default is not set and fstype is unset in the StorageClass, then no fstype will be set defaultFsType: ext4 diff --git a/deploy/kubernetes/base/controller.yaml b/deploy/kubernetes/base/controller.yaml index 397c8e696f..cd03d597a0 100644 --- a/deploy/kubernetes/base/controller.yaml +++ b/deploy/kubernetes/base/controller.yaml @@ -23,6 +23,16 @@ spec: kubernetes.io/os: linux serviceAccountName: ebs-csi-controller-sa priorityClassName: system-cluster-critical + affinity: + nodeAffinity: + preference: + matchExpressions: + - key: eks.amazonaws.com/compute-type + operator: NotIn + values: + - fargate + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 tolerations: - key: CriticalAddonsOnly operator: Exists