Mohammed Naser | 651b904 | 2024-04-30 15:55:38 -0400 | [diff] [blame] | 1 | --- |
| 2 | - name: Deploy CSI RBAC |
| 3 | kubernetes.core.k8s: |
| 4 | state: present |
| 5 | definition: "{{ lookup('file', 'storpool-csi-' ~ item.name ~ '-rbac.yaml') | from_yaml_all }}" |
| 6 | loop: |
| 7 | - name: controllerplugin |
| 8 | - name: nodeplugin |
| 9 | |
| 10 | - name: Deploy CSI |
| 11 | kubernetes.core.k8s: |
| 12 | state: present |
| 13 | definition: |
| 14 | - "{{ lookup('file', 'storpool-csi-controllerplugin.yaml') | from_yaml }}" |
| 15 | - "{{ lookup('file', 'storpool-csi-driver.yaml') | from_yaml }}" |
| 16 | - "{{ lookup('file', 'storpool-csi-nodeplugin.yaml') | from_yaml }}" |
| 17 | |
| 18 | - name: Create StorageClass |
| 19 | kubernetes.core.k8s: |
| 20 | state: present |
| 21 | definition: |
| 22 | apiVersion: storage.k8s.io/v1 |
| 23 | kind: StorageClass |
| 24 | metadata: |
| 25 | name: general |
| 26 | annotations: |
| 27 | storageclass.kubernetes.io/is-default-class: "true" |
| 28 | provisioner: csi.storpool.com |
| 29 | allowVolumeExpansion: true |
| 30 | volumeBindingMode: WaitForFirstConsumer |
| 31 | reclaimPolicy: Delete |
| 32 | parameters: |
| 33 | template: "{{ storpool_csi_template }}" |