From b715500b484509f27afaa37bab0f329cabe17598 Mon Sep 17 00:00:00 2001 From: Robin Wallace Date: Mon, 9 May 2022 19:43:19 +0200 Subject: [PATCH] csi: bump upcloud csi driver (#8784) --- inventory/sample/group_vars/all/upcloud.yml | 4 +++- roles/kubernetes-apps/csi_driver/upcloud/defaults/main.yml | 2 +- .../upcloud/templates/upcloud-csi-controller.yml.j2 | 1 - .../csi_driver/upcloud/templates/upcloud-csi-driver.yml.j2 | 3 ++- .../csi_driver/upcloud/templates/upcloud-csi-node.yml.j2 | 3 +-- .../persistent_volumes/upcloud-csi/defaults/main.yml | 2 ++ .../upcloud-csi/templates/upcloud-csi-storage-class.yml.j2 | 4 ++++ 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/inventory/sample/group_vars/all/upcloud.yml b/inventory/sample/group_vars/all/upcloud.yml index 060f63249..16e6e6fb2 100644 --- a/inventory/sample/group_vars/all/upcloud.yml +++ b/inventory/sample/group_vars/all/upcloud.yml @@ -7,11 +7,13 @@ # upcloud_csi_provisioner_image_tag: "v3.1.0" # upcloud_csi_attacher_image_tag: "v3.4.0" # upcloud_csi_resizer_image_tag: "v1.4.0" -# upcloud_csi_plugin_image_tag: "alpha" +# upcloud_csi_plugin_image_tag: "v0.2.1" # upcloud_csi_node_image_tag: "v2.5.0" # upcloud_tolerations: [] ## Storage class options # expand_persistent_volumes: true +# parameters: +# tier: maxiops # or hdd # storage_classes: # - name: standard # is_default: true diff --git a/roles/kubernetes-apps/csi_driver/upcloud/defaults/main.yml b/roles/kubernetes-apps/csi_driver/upcloud/defaults/main.yml index 810d00fd2..01541ec1d 100644 --- a/roles/kubernetes-apps/csi_driver/upcloud/defaults/main.yml +++ b/roles/kubernetes-apps/csi_driver/upcloud/defaults/main.yml @@ -3,7 +3,7 @@ upcloud_csi_controller_replicas: 1 upcloud_csi_provisioner_image_tag: "v3.1.0" upcloud_csi_attacher_image_tag: "v3.4.0" upcloud_csi_resizer_image_tag: "v1.4.0" -upcloud_csi_plugin_image_tag: "alpha" +upcloud_csi_plugin_image_tag: "v0.2.1" upcloud_csi_node_image_tag: "v2.5.0" upcloud_username: "{{ lookup('env','UPCLOUD_USERNAME') }}" upcloud_password: "{{ lookup('env','UPCLOUD_PASSWORD') }}" diff --git a/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-controller.yml.j2 b/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-controller.yml.j2 index 71228aabf..5bf676ede 100644 --- a/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-controller.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-controller.yml.j2 @@ -65,7 +65,6 @@ spec: - "--nodehost=$(NODE_ID)" - "--username=$(UPCLOUD_USERNAME)" - "--password=$(UPCLOUD_PASSWORD)" - - "--url=$(UPCLOUD_API_URL)" env: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock diff --git a/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-driver.yml.j2 b/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-driver.yml.j2 index b5c455324..363394a21 100644 --- a/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-driver.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-driver.yml.j2 @@ -4,4 +4,5 @@ metadata: name: storage.csi.upcloud.com spec: attachRequired: true - podInfoOnMount: true \ No newline at end of file + podInfoOnMount: true + fsGroupPolicy: File \ No newline at end of file diff --git a/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-node.yml.j2 b/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-node.yml.j2 index 6961b8ff1..0b7b1c9dc 100644 --- a/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-node.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/upcloud/templates/upcloud-csi-node.yml.j2 @@ -47,13 +47,12 @@ spec: - name: registration-dir mountPath: /registration/ - name: csi-upcloud-plugin - image: ghcr.io/upcloudltd/upcloud-csi:alpha + image: ghcr.io/upcloudltd/upcloud-csi:{{ upcloud_csi_plugin_image_tag }} args: - "--endpoint=$(CSI_ENDPOINT)" - "--nodehost=$(NODE_ID)" - "--username=$(UPCLOUD_USERNAME)" - "--password=$(UPCLOUD_PASSWORD)" - - "--url=$(UPCLOUD_API_URL)" env: - name: CSI_ENDPOINT value: unix:///csi/csi.sock diff --git a/roles/kubernetes-apps/persistent_volumes/upcloud-csi/defaults/main.yml b/roles/kubernetes-apps/persistent_volumes/upcloud-csi/defaults/main.yml index 2e4726c1f..7ca901ee1 100644 --- a/roles/kubernetes-apps/persistent_volumes/upcloud-csi/defaults/main.yml +++ b/roles/kubernetes-apps/persistent_volumes/upcloud-csi/defaults/main.yml @@ -1,5 +1,7 @@ --- expand_persistent_volumes: true +parameters: + tier: maxiops storage_classes: - name: standard is_default: true diff --git a/roles/kubernetes-apps/persistent_volumes/upcloud-csi/templates/upcloud-csi-storage-class.yml.j2 b/roles/kubernetes-apps/persistent_volumes/upcloud-csi/templates/upcloud-csi-storage-class.yml.j2 index fe66801fa..058531a30 100644 --- a/roles/kubernetes-apps/persistent_volumes/upcloud-csi/templates/upcloud-csi-storage-class.yml.j2 +++ b/roles/kubernetes-apps/persistent_volumes/upcloud-csi/templates/upcloud-csi-storage-class.yml.j2 @@ -7,5 +7,9 @@ metadata: annotations: storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}" provisioner: storage.csi.upcloud.com +parameters: +{% for key, value in (class.parameters | default({})).items() %} + "{{ key }}": "{{ value }}" +{% endfor %} allowVolumeExpansion: {{ expand_persistent_volumes }} {% endfor %}