From 03c48e2826c7f797383e13d3fe6bf61c2b705274 Mon Sep 17 00:00:00 2001 From: Ihar Vauchok Date: Wed, 15 Jun 2022 18:24:20 +0300 Subject: [PATCH] Feature: Node affinity --- .../aws-ebs-csi-driver/templates/node-windows.yaml | 12 +++--------- charts/aws-ebs-csi-driver/templates/node.yaml | 12 +++--------- charts/aws-ebs-csi-driver/values.yaml | 9 +++++++++ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/charts/aws-ebs-csi-driver/templates/node-windows.yaml b/charts/aws-ebs-csi-driver/templates/node-windows.yaml index 513817b0a..636dac0cd 100644 --- a/charts/aws-ebs-csi-driver/templates/node-windows.yaml +++ b/charts/aws-ebs-csi-driver/templates/node-windows.yaml @@ -26,15 +26,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: eks.amazonaws.com/compute-type - operator: NotIn - values: - - fargate + {{- with .Values.node.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} nodeSelector: kubernetes.io/os: windows {{- with .Values.node.nodeSelector }} diff --git a/charts/aws-ebs-csi-driver/templates/node.yaml b/charts/aws-ebs-csi-driver/templates/node.yaml index 339a5882b..bc628ab3c 100644 --- a/charts/aws-ebs-csi-driver/templates/node.yaml +++ b/charts/aws-ebs-csi-driver/templates/node.yaml @@ -26,15 +26,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: eks.amazonaws.com/compute-type - operator: NotIn - values: - - fargate + {{- with .Values.node.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} nodeSelector: kubernetes.io/os: linux {{- with .Values.node.nodeSelector }} diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index 659e68d69..cc9f87db4 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -143,6 +143,15 @@ node: kubeletPath: /var/lib/kubelet logLevel: 2 priorityClassName: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: eks.amazonaws.com/compute-type + operator: NotIn + values: + - fargate nodeSelector: {} podAnnotations: {} podLabels: {}