Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 1 | {{- $root := . -}} |
| 2 | {{- range $blockpool := .Values.cephBlockPools -}} |
| 3 | --- |
| 4 | apiVersion: ceph.rook.io/v1 |
| 5 | kind: CephBlockPool |
| 6 | metadata: |
| 7 | name: {{ $blockpool.name }} |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 8 | namespace: {{ $root.Release.Namespace }} # namespace:cluster |
Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 9 | spec: |
| 10 | {{ toYaml $blockpool.spec | indent 2 }} |
| 11 | --- |
| 12 | {{- if default false $blockpool.storageClass.enabled }} |
| 13 | apiVersion: storage.k8s.io/v1 |
| 14 | kind: StorageClass |
| 15 | metadata: |
| 16 | name: {{ $blockpool.storageClass.name }} |
| 17 | annotations: |
| 18 | storageclass.kubernetes.io/is-default-class: "{{ if default false $blockpool.storageClass.isDefault }}true{{ else }}false{{ end }}" |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 19 | {{- if $root.Values.csiDriverNamePrefix }} |
| 20 | provisioner: {{ $root.Values.csiDriverNamePrefix }}.rbd.csi.ceph.com |
| 21 | {{- else }} |
Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 22 | provisioner: {{ $root.Values.operatorNamespace }}.rbd.csi.ceph.com |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 23 | {{- end }} |
Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 24 | parameters: |
| 25 | pool: {{ $blockpool.name }} |
| 26 | clusterID: {{ $root.Release.Namespace }} |
| 27 | {{ with $blockpool.storageClass.parameters }} |
| 28 | {{ tpl (toYaml .) $ | indent 2 }} |
| 29 | {{ end }} |
| 30 | reclaimPolicy: {{ default "Delete" $blockpool.storageClass.reclaimPolicy }} |
| 31 | allowVolumeExpansion: {{ default "true" $blockpool.storageClass.allowVolumeExpansion }} |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 32 | volumeBindingMode: {{ default "Immediate" $blockpool.storageClass.volumeBindingMode }} |
Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 33 | {{- if $blockpool.storageClass.mountOptions }} |
| 34 | mountOptions: |
| 35 | {{- range $blockpool.storageClass.mountOptions }} |
| 36 | - {{ . }} |
| 37 | {{- end }} |
| 38 | {{- end }} |
| 39 | {{ if $blockpool.storageClass.allowedTopologies }} |
| 40 | allowedTopologies: |
| 41 | {{ with $blockpool.storageClass.allowedTopologies }} |
| 42 | {{ toYaml . | indent 2 }} |
| 43 | {{ end }} |
| 44 | {{ end }} |
| 45 | {{ end }} |
| 46 | {{ end }} |