From b5a5478a8a72db611da27cc4eb4b16b98f9def24 Mon Sep 17 00:00:00 2001 From: Ajarmar <37733838+Ajarmar@users.noreply.github.com> Date: Thu, 11 Nov 2021 20:48:07 +0100 Subject: [PATCH] Added tolerations for cinder-csi-nodeplugin DaemonSet (#8137) --- roles/kubernetes-apps/csi_driver/cinder/defaults/main.yml | 2 ++ .../csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/roles/kubernetes-apps/csi_driver/cinder/defaults/main.yml b/roles/kubernetes-apps/csi_driver/cinder/defaults/main.yml index 65f433594..6a13e8612 100644 --- a/roles/kubernetes-apps/csi_driver/cinder/defaults/main.yml +++ b/roles/kubernetes-apps/csi_driver/cinder/defaults/main.yml @@ -26,3 +26,5 @@ cinder_csi_controller_replicas: 1 # log on resize event. It is recommended to disable this option in this case. # Defaults to false # cinder_csi_rescan_on_resize: true + +cinder_tolerations: [] diff --git a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 index 5787b7cf3..3d901ec98 100644 --- a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 @@ -121,3 +121,7 @@ spec: path: {{ kube_config_dir }}/cinder-cacert.pem type: FileOrCreate {% endif %} +{% if cinder_tolerations %} + tolerations: + {{ cinder_tolerations | to_nice_yaml(indent=2) | indent(width=8) }} +{% endif %}