From 9529fb5edfd3c743880ed1485d24d4a1e567e787 Mon Sep 17 00:00:00 2001 From: tirumerla Date: Mon, 7 Dec 2020 16:18:08 -0800 Subject: [PATCH] fix: apply resource constraints to all sidecar containers --- .../aws-ebs-csi-driver/templates/controller.yaml | 15 +++++++++++++++ charts/aws-ebs-csi-driver/templates/node.yaml | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/charts/aws-ebs-csi-driver/templates/controller.yaml b/charts/aws-ebs-csi-driver/templates/controller.yaml index 6a691b803d..2518d905ff 100644 --- a/charts/aws-ebs-csi-driver/templates/controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/controller.yaml @@ -113,6 +113,9 @@ spec: volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} - name: csi-attacher image: {{ printf "%s:%s" .Values.sidecars.attacherImage.repository .Values.sidecars.attacherImage.tag }} args: @@ -126,6 +129,9 @@ spec: volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} {{- if .Values.enableVolumeSnapshot }} - name: csi-snapshotter image: {{ printf "%s:%s" .Values.sidecars.snapshotterImage.repository .Values.sidecars.snapshotterImage.tag }} @@ -138,6 +144,9 @@ spec: volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} {{- end }} {{- if .Values.enableVolumeResizing }} - name: csi-resizer @@ -152,6 +161,9 @@ spec: volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} {{- end }} - name: liveness-probe image: {{ printf "%s:%s" .Values.sidecars.livenessProbeImage.repository .Values.sidecars.livenessProbeImage.tag }} @@ -160,6 +172,9 @@ spec: volumeMounts: - name: socket-dir mountPath: /csi + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} volumes: - name: socket-dir emptyDir: {} diff --git a/charts/aws-ebs-csi-driver/templates/node.yaml b/charts/aws-ebs-csi-driver/templates/node.yaml index eb51b95f3e..b808342ea9 100644 --- a/charts/aws-ebs-csi-driver/templates/node.yaml +++ b/charts/aws-ebs-csi-driver/templates/node.yaml @@ -73,6 +73,9 @@ spec: timeoutSeconds: 3 periodSeconds: 10 failureThreshold: 5 + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} - name: node-driver-registrar image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrarImage.repository .Values.sidecars.nodeDriverRegistrarImage.tag }} args: @@ -93,6 +96,9 @@ spec: mountPath: /csi - name: registration-dir mountPath: /registration + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} - name: liveness-probe image: {{ printf "%s:%s" .Values.sidecars.livenessProbeImage.repository .Values.sidecars.livenessProbeImage.tag }} args: @@ -100,6 +106,9 @@ spec: volumeMounts: - name: plugin-dir mountPath: /csi + {{- with .Values.resources }} + resources: {{ toYaml . | nindent 12 }} + {{- end }} volumes: - name: kubelet-dir hostPath: