From 04827ca101ae69492c38b70ec7ba1bb738d693c7 Mon Sep 17 00:00:00 2001 From: Clay Buxton Date: Wed, 6 Nov 2024 21:18:24 -0500 Subject: [PATCH] add init containers to node daemonset --- charts/aws-ebs-csi-driver/templates/_node-windows.tpl | 4 ++++ charts/aws-ebs-csi-driver/templates/_node.tpl | 4 ++++ charts/aws-ebs-csi-driver/values.yaml | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/charts/aws-ebs-csi-driver/templates/_node-windows.tpl b/charts/aws-ebs-csi-driver/templates/_node-windows.tpl index 3bd70367a7..5fdc6775ca 100644 --- a/charts/aws-ebs-csi-driver/templates/_node-windows.tpl +++ b/charts/aws-ebs-csi-driver/templates/_node-windows.tpl @@ -57,6 +57,10 @@ spec: hostProcess: true runAsUserName: "NT AUTHORITY\\SYSTEM" hostNetwork: true + {{- with .Values.node.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} containers: - name: ebs-plugin diff --git a/charts/aws-ebs-csi-driver/templates/_node.tpl b/charts/aws-ebs-csi-driver/templates/_node.tpl index 49464cbcba..134ac239bd 100644 --- a/charts/aws-ebs-csi-driver/templates/_node.tpl +++ b/charts/aws-ebs-csi-driver/templates/_node.tpl @@ -60,6 +60,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.node.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: ebs-plugin image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (toString .Values.image.tag)) }} diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index 73c0fec126..5adc656137 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -435,6 +435,14 @@ node: containerSecurityContext: readOnlyRootFilesystem: true privileged: true + initContainers: [] + # containers to be run before the csi-node's container starts. + # + # Example: + # + # - name: wait + # image: busybox + # command: [ 'sh', '-c', "sleep 20" ] # Enable opentelemetry tracing for the plugin running on the daemonset otelTracing: {} # otelServiceName: ebs-csi-node