From 724a3162040f2a4ed32ebbe5b07947f9a3942997 Mon Sep 17 00:00:00 2001 From: Hugo Blom Date: Tue, 28 Apr 2020 09:12:04 +0200 Subject: [PATCH] Cinder-CSI default storageclass and volumeBindingMode (#6026) * Set volumeBindingMode in cinder CSI template (#22) * make sure true/false is lowercase in cinder-csi storageclass --- .../cinder-csi/templates/cinder-csi-storage-class.yml.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes-apps/persistent_volumes/cinder-csi/templates/cinder-csi-storage-class.yml.j2 b/roles/kubernetes-apps/persistent_volumes/cinder-csi/templates/cinder-csi-storage-class.yml.j2 index 5f1f625da..8a66443ee 100644 --- a/roles/kubernetes-apps/persistent_volumes/cinder-csi/templates/cinder-csi-storage-class.yml.j2 +++ b/roles/kubernetes-apps/persistent_volumes/cinder-csi/templates/cinder-csi-storage-class.yml.j2 @@ -5,8 +5,9 @@ apiVersion: storage.k8s.io/v1 metadata: name: "{{ class.name }}" annotations: - storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) }}" + storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}" provisioner: cinder.csi.openstack.org +volumeBindingMode: WaitForFirstConsumer parameters: {% for key, value in (class.parameters | default({})).items() %} "{{ key }}": "{{ value }}"