Skip to content

Commit

Permalink
api: Add new feild for supporting the cephfs encrypted storageclass
Browse files Browse the repository at this point in the history
Signed-off-by: Nitin Goyal <[email protected]>
  • Loading branch information
iamniting committed May 13, 2024
1 parent fe1a71b commit e416fcb
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 3 deletions.
17 changes: 16 additions & 1 deletion api/v1/storagecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,18 +456,33 @@ type EncryptionSpec struct {
Enable bool `json:"enable,omitempty"`
// +optional
ClusterWide bool `json:"clusterWide,omitempty"`
// Configure the default rbd encrypted storage class
// +optional
StorageClass bool `json:"storageClass,omitempty"`
// StorageClassName specifies the name of the storage class created for ceph encrypted block pools
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
StorageClassName string `json:"storageClassName,omitempty"`
StorageClassName string `json:"storageClassName,omitempty"`
// Configure the default CephFS encrypted storage class
// +optional
CephFs DefaultStorageClassSpec `json:"cephfs,omitempty"`
KeyManagementService KeyManagementServiceSpec `json:"kms,omitempty"`
// KeyRotation defines options for Key Rotation.
// +optional
KeyRotation KeyRotationSpec `json:"keyRotation,omitempty"`
}

type DefaultStorageClassSpec struct {
// Enable Default StorageClass
// +optional
StorageClass bool `json:"storageClass,omitempty"`
// StorageClassName specifies the name of the storage class
// +optional
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
StorageClassName string `json:"storageClassName,omitempty"`
}

// KeyRotationSpec represents the settings for Key Rotation.
type KeyRotationSpec struct {
// Enable represents whether the key rotation is enabled.
Expand Down
14 changes: 14 additions & 0 deletions config/crd/bases/ocs.openshift.io_storageclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,19 @@ spec:
description: EncryptionSpec defines if encryption should be enabled
for the Storage Cluster It is optional and defaults to false.
properties:
cephfs:
description: Configure the default CephFS encrypted storage class
properties:
storageClass:
description: Enable Default StorageClass
type: boolean
storageClassName:
description: StorageClassName specifies the name of the storage
class
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
type: object
clusterWide:
type: boolean
enable:
Expand Down Expand Up @@ -595,6 +608,7 @@ spec:
type: boolean
type: object
storageClass:
description: Configure the default rbd encrypted storage class
type: boolean
storageClassName:
description: StorageClassName specifies the name of the storage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,19 @@ spec:
description: EncryptionSpec defines if encryption should be enabled
for the Storage Cluster It is optional and defaults to false.
properties:
cephfs:
description: Configure the default CephFS encrypted storage class
properties:
storageClass:
description: Enable Default StorageClass
type: boolean
storageClassName:
description: StorageClassName specifies the name of the storage
class
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
type: object
clusterWide:
type: boolean
enable:
Expand Down Expand Up @@ -595,6 +608,7 @@ spec:
type: boolean
type: object
storageClass:
description: Configure the default rbd encrypted storage class
type: boolean
storageClassName:
description: StorageClassName specifies the name of the storage
Expand Down
14 changes: 14 additions & 0 deletions deploy/ocs-operator/manifests/storagecluster.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,19 @@ spec:
description: EncryptionSpec defines if encryption should be enabled
for the Storage Cluster It is optional and defaults to false.
properties:
cephfs:
description: Configure the default CephFS encrypted storage class
properties:
storageClass:
description: Enable Default StorageClass
type: boolean
storageClassName:
description: StorageClassName specifies the name of the storage
class
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
type: object
clusterWide:
type: boolean
enable:
Expand Down Expand Up @@ -594,6 +607,7 @@ spec:
type: boolean
type: object
storageClass:
description: Configure the default rbd encrypted storage class
type: boolean
storageClassName:
description: StorageClassName specifies the name of the storage
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e416fcb

Please sign in to comment.