Skip to content

Commit 3dbdc4e

Browse files
fix: defaultPlugins validations (#1098)
* fix: CRD validations Signed-off-by: Mateus Oliveira <[email protected]> * fixup! fix: CRD validations Signed-off-by: Mateus Oliveira <[email protected]> --------- Signed-off-by: Mateus Oliveira <[email protected]>
1 parent c492da4 commit 3dbdc4e

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

api/v1alpha1/cloud_storage_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ type CloudStorageSpec struct {
3838
Tags map[string]string `json:"tags,omitempty"`
3939
// region for the bucket to be in, will be us-east-1 if not set.
4040
Region string `json:"region,omitempty"`
41-
// +kubebuilder:validation:Enum=aws
4241
// provider is the provider of the cloud storage
42+
// +kubebuilder:validation:Enum=aws
4343
Provider CloudStorageProvider `json:"provider"`
4444

4545
// https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/[email protected]#section-readme

api/v1alpha1/oadp_types.go

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const OadpBSLProviderLabel = "openshift.io/oadp-bsl-provider"
4242
const DataMoverLabel = "openshift.io/volume-snapshot-mover"
4343
const StorageClassLabel = "openshift.io/vsm-storageclass"
4444

45+
// +kubebuilder:validation:Enum=aws;gcp;azure;csi;vsm;openshift;kubevirt
4546
type DefaultPlugin string
4647

4748
const DefaultPluginAWS DefaultPlugin = "aws"

bundle/manifests/oadp.openshift.io_dataprotectionapplications.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,14 @@ spec:
488488
type: string
489489
defaultPlugins:
490490
items:
491+
enum:
492+
- aws
493+
- gcp
494+
- azure
495+
- csi
496+
- vsm
497+
- openshift
498+
- kubevirt
491499
type: string
492500
type: array
493501
featureFlags:

config/crd/bases/oadp.openshift.io_dataprotectionapplications.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,14 @@ spec:
488488
type: string
489489
defaultPlugins:
490490
items:
491+
enum:
492+
- aws
493+
- gcp
494+
- azure
495+
- csi
496+
- vsm
497+
- openshift
498+
- kubevirt
491499
type: string
492500
type: array
493501
featureFlags:

0 commit comments

Comments
 (0)