Skip to content

Commit 011bc55

Browse files
committed
fix: use concrete type for encryption poriver
1 parent e8057bf commit 011bc55

5 files changed

+12
-8
lines changed

api/v1alpha1/clusterconfig_types.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const (
2424
CSIProviderAWSEBS = "aws-ebs"
2525
CSIProviderNutanix = "nutanix"
2626

27-
CCMProviderAWS = "aws"
28-
CCMProviderNutanix = "nutanix"
27+
CCMProviderAWS = "aws"
28+
CCMProviderNutanix = "nutanix"
29+
AESCBC EncryptionProvider = "aescbc"
2930
)
3031

3132
var (
@@ -275,12 +276,15 @@ type User struct {
275276
type Encryption struct {
276277
// Encryption providers
277278
// +kubebuilder:validation:UniqueItems=true
278-
// +kubebuilder:validation:Enum=aescbc;aesgcm
279+
// +kubebuilder:validation:MaxItems=1
280+
// +kubebuilder:validation:Enum=aescbc
279281
// +kubebuilder:default=aescbc
280282
// +optional
281-
Providers []string `json:"providers"`
283+
Providers []EncryptionProvider `json:"providers"`
282284
}
283285

286+
type EncryptionProvider string
287+
284288
func init() {
285289
SchemeBuilder.Register(
286290
&AWSClusterConfig{},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ spec:
309309
description: Encryption providers
310310
enum:
311311
- aescbc
312-
- aesgcm
313312
items:
314313
type: string
314+
maxItems: 1
315315
type: array
316316
uniqueItems: true
317317
type: object

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ spec:
228228
description: Encryption providers
229229
enum:
230230
- aescbc
231-
- aesgcm
232231
items:
233232
type: string
233+
maxItems: 1
234234
type: array
235235
uniqueItems: true
236236
type: object

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,9 @@ spec:
376376
description: Encryption providers
377377
enum:
378378
- aescbc
379-
- aesgcm
380379
items:
381380
type: string
381+
maxItems: 1
382382
type: array
383383
uniqueItems: true
384384
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)