Skip to content

Commit 2532c3f

Browse files
committed
fix: use concrete type for encryption poriver
1 parent c4ad55a commit 2532c3f

5 files changed

+9
-6
lines changed

api/v1alpha1/clusterconfig_types.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,15 @@ type User struct {
288288
type Encryption struct {
289289
// Encryption providers
290290
// +kubebuilder:validation:UniqueItems=true
291-
// +kubebuilder:validation:Enum=aescbc;aesgcm
291+
// +kubebuilder:validation:MaxItems=1
292+
// +kubebuilder:validation:Enum=aescbc
292293
// +kubebuilder:default=aescbc
293294
// +optional
294-
Providers []string `json:"providers"`
295+
Providers []EncryptionProvider `json:"providers"`
295296
}
296297

298+
type EncryptionProvider string
299+
297300
func init() {
298301
SchemeBuilder.Register(
299302
&AWSClusterConfig{},

api/v1alpha1/crds/caren.nutanix.com_awsclusterconfigs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ spec:
333333
description: Encryption providers
334334
enum:
335335
- aescbc
336-
- aesgcm
337336
items:
338337
type: string
338+
maxItems: 1
339339
type: array
340340
uniqueItems: true
341341
type: object

api/v1alpha1/crds/caren.nutanix.com_dockerclusterconfigs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ spec:
250250
description: Encryption providers
251251
enum:
252252
- aescbc
253-
- aesgcm
254253
items:
255254
type: string
255+
maxItems: 1
256256
type: array
257257
uniqueItems: true
258258
type: object

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ spec:
421421
description: Encryption providers
422422
enum:
423423
- aescbc
424-
- aesgcm
425424
items:
426425
type: string
426+
maxItems: 1
427427
type: array
428428
uniqueItems: true
429429
type: object

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)