helm: support adding annotations to StorageClasses

Signed-off-by: Shaohui Liu <liushaohui@xiaomi.com>
This commit is contained in:
Shaohui Liu 2021-10-26 11:32:17 +08:00 committed by mergify[bot]
parent c852f487a5
commit af752dd38f
6 changed files with 37 additions and 14 deletions

View File

@ -135,6 +135,7 @@ charts and their default values.
| `externallyManagedConfigmap` | Specifies the use of an externally provided configmap | `false` | | `externallyManagedConfigmap` | Specifies the use of an externally provided configmap | `false` |
| `storageClass.create` | Specifies whether the StorageClass should be created | `false` | | `storageClass.create` | Specifies whether the StorageClass should be created | `false` |
| `storageClass.name` | Specifies the cephFS StorageClass name | `csi-cephfs-sc` | | `storageClass.name` | Specifies the cephFS StorageClass name | `csi-cephfs-sc` |
| `storageClass.annotations` | Specifies the annotations for the cephFS storageClass | `[]` |
| `storageClass.clusterID` | String representing a Ceph cluster to provision storage from | `<cluster-ID>` | | `storageClass.clusterID` | String representing a Ceph cluster to provision storage from | `<cluster-ID>` |
| `storageClass.fsName` | CephFS filesystem name into which the volume shall be created | `myfs` | | `storageClass.fsName` | CephFS filesystem name into which the volume shall be created | `myfs` |
| `storageClass.pool` | Ceph pool into which volume data shall be stored | `""` | | `storageClass.pool` | Ceph pool into which volume data shall be stored | `""` |

View File

@ -4,6 +4,10 @@ kind: StorageClass
metadata: metadata:
name: {{ .Values.storageClass.name }} name: {{ .Values.storageClass.name }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- if .Values.storageClass.annotations }}
annotations:
{{ toYaml .Values.storageClass.annotations | indent 4 }}
{{- end }}
labels: labels:
app: {{ include "ceph-csi-cephfs.name" . }} app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }} chart: {{ include "ceph-csi-cephfs.chart" . }}

View File

@ -217,6 +217,12 @@ storageClass:
# Specifies whether the Storage class should be created # Specifies whether the Storage class should be created
create: false create: false
name: csi-cephfs-sc name: csi-cephfs-sc
# Annotations for the storage class
# Example:
# annotations:
# storageclass.kubernetes.io/is-default-class: "true"
annotations: {}
# String representing a Ceph cluster to provision storage from. # String representing a Ceph cluster to provision storage from.
# Should be unique across all Ceph clusters in use for provisioning, # Should be unique across all Ceph clusters in use for provisioning,
# cannot be greater than 36 bytes in length, and should remain immutable for # cannot be greater than 36 bytes in length, and should remain immutable for

View File

@ -145,6 +145,7 @@ charts and their default values.
| `kmsConfigMapName` | Name of the configmap used for encryption kms configuration | `ceph-csi-encryption-kms-config` | | `kmsConfigMapName` | Name of the configmap used for encryption kms configuration | `ceph-csi-encryption-kms-config` |
| `storageClass.create` | Specifies whether the StorageClass should be created | `false` | | `storageClass.create` | Specifies whether the StorageClass should be created | `false` |
| `storageClass.name` | Specifies the rbd StorageClass name | `csi-rbd-sc` | | `storageClass.name` | Specifies the rbd StorageClass name | `csi-rbd-sc` |
| `storageClass.annotations` | Specifies the annotations for the rbd StorageClass | `[]` |
| `storageClass.clusterID` | String representing a Ceph cluster to provision storage from | `<cluster-ID>` | | `storageClass.clusterID` | String representing a Ceph cluster to provision storage from | `<cluster-ID>` |
| `storageClass.dataPool` | Specifies the erasure coded pool | `""` | | `storageClass.dataPool` | Specifies the erasure coded pool | `""` |
| `storageClass.pool` | Ceph pool into which the RBD image shall be created | `replicapool` | | `storageClass.pool` | Ceph pool into which the RBD image shall be created | `replicapool` |

View File

@ -4,6 +4,10 @@ kind: StorageClass
metadata: metadata:
name: {{ .Values.storageClass.name }} name: {{ .Values.storageClass.name }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- if .Values.storageClass.annotations }}
annotations:
{{ toYaml .Values.storageClass.annotations | indent 4 }}
{{- end }}
labels: labels:
app: {{ include "ceph-csi-rbd.name" . }} app: {{ include "ceph-csi-rbd.name" . }}
chart: {{ include "ceph-csi-rbd.chart" . }} chart: {{ include "ceph-csi-rbd.chart" . }}

View File

@ -254,6 +254,13 @@ storageClass:
# Specifies whether the storageclass should be created # Specifies whether the storageclass should be created
create: false create: false
name: csi-rbd-sc name: csi-rbd-sc
# Annotations for the storage class
# Example:
# annotations:
# storageclass.kubernetes.io/is-default-class: "true"
annotations: {}
# (required) String representing a Ceph cluster to provision storage from. # (required) String representing a Ceph cluster to provision storage from.
# Should be unique across all Ceph clusters in use for provisioning, # Should be unique across all Ceph clusters in use for provisioning,
# cannot be greater than 36 bytes in length, and should remain immutable for # cannot be greater than 36 bytes in length, and should remain immutable for