core: add KeyRotationSpec to cephcluster CR

This commit adds KeyRotationSpec to cephcluster CR
to support encryption key rotation feature.
If enabled Rook will create a cronjob for each
encrypted PVC based OSD with given schedule set
to rotate their respective key encryption key.

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R committed 2023-03-08 12:07:26 +05:30
1 parent 6e296ecc71
commit 46dd2eb5ff
3 files changed
+68

No files matched your search

@@ -2548,6 +2548,19 @@ spec:
description: Security represents security settings
nullable: true
properties:
keyRotation:
description: KeyRotation defines options for Key Rotation.
nullable: true
properties:
enabled:
default: false
description: Enabled represents whether the key rotation is enabled.
type: boolean
schedule:
default: '@weekly'
description: Schedule represents the cron schedule for key rotation.
type: string
type: object
kms:
description: KeyManagementService is the main Key Management option
nullable: true
@@ -12986,6 +12999,19 @@ spec:
description: Security represents security settings
nullable: true
properties:
keyRotation:
description: KeyRotation defines options for Key Rotation.
nullable: true
properties:
enabled:
default: false
description: Enabled represents whether the key rotation is enabled.
type: boolean
schedule:
default: '@weekly'
description: Schedule represents the cron schedule for key rotation.
type: string
type: object
kms:
description: KeyManagementService is the main Key Management option
nullable: true
+26
View File
@@ -2546,6 +2546,19 @@ spec:
description: Security represents security settings
nullable: true
properties:
keyRotation:
description: KeyRotation defines options for Key Rotation.
nullable: true
properties:
enabled:
default: false
description: Enabled represents whether the key rotation is enabled.
type: boolean
schedule:
default: '@weekly'
description: Schedule represents the cron schedule for key rotation.
type: string
type: object
kms:
description: KeyManagementService is the main Key Management option
nullable: true
@@ -12978,6 +12991,19 @@ spec:
description: Security represents security settings
nullable: true
properties:
keyRotation:
description: KeyRotation defines options for Key Rotation.
nullable: true
properties:
enabled:
default: false
description: Enabled represents whether the key rotation is enabled.
type: boolean
schedule:
default: '@weekly'
description: Schedule represents the cron schedule for key rotation.
type: string
type: object
kms:
description: KeyManagementService is the main Key Management option
nullable: true
+16
View File
@@ -242,6 +242,10 @@ type SecuritySpec struct {
// +optional
// +nullable
KeyManagementService KeyManagementServiceSpec `json:"kms,omitempty"`
// KeyRotation defines options for Key Rotation.
// +optional
// +nullable
KeyRotation KeyRotationSpec `json:"keyRotation,omitempty"`
}
// ObjectStoreSecuritySpec is spec to define security features like encryption
@@ -268,6 +272,18 @@ type KeyManagementServiceSpec struct {
TokenSecretName string `json:"tokenSecretName,omitempty"`
}
// KeyRotationSpec represents the settings for Key Rotation.
type KeyRotationSpec struct {
// Enabled represents whether the key rotation is enabled.
// +optional
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// Schedule represents the cron schedule for key rotation.
// +optional
// +kubebuilder:default="@weekly"
Schedule string `json:"schedule,omitempty"`
}
// CephVersionSpec represents the settings for the Ceph version that Rook is orchestrating.
type CephVersionSpec struct {
// Image is the container image used to launch the ceph daemons, such as quay.io/ceph/ceph:<tag>