Skip to content

Commit f2f4831

Browse files
committed
pre-commit changes
1 parent e9bf0fa commit f2f4831

11 files changed

+96
-394
lines changed

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ spec:
376376
properties:
377377
name:
378378
description: name is the resource name in the PC
379+
minLength: 1
379380
type: string
380381
type:
381382
description: Type is the identifier type to use for this resource.
@@ -385,10 +386,18 @@ spec:
385386
type: string
386387
uuid:
387388
description: uuid is the UUID of the resource in the PC.
389+
format: uuid
390+
maxLength: 36
391+
minLength: 36
388392
type: string
389393
required:
390394
- type
391395
type: object
396+
x-kubernetes-validations:
397+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
398+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
399+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
400+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
392401
gpus:
393402
description: List of GPU devices that need to be added to the machines.
394403
items:
@@ -418,6 +427,7 @@ spec:
418427
properties:
419428
name:
420429
description: name is the resource name in the PC
430+
minLength: 1
421431
type: string
422432
type:
423433
description: Type is the identifier type to use for this resource.
@@ -427,10 +437,18 @@ spec:
427437
type: string
428438
uuid:
429439
description: uuid is the UUID of the resource in the PC.
440+
format: uuid
441+
maxLength: 36
442+
minLength: 36
430443
type: string
431444
required:
432445
- type
433446
type: object
447+
x-kubernetes-validations:
448+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
449+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
450+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
451+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
434452
imageLookup:
435453
description: imageLookup is a container that holds how to look up vm images for the cluster.
436454
properties:
@@ -470,6 +488,7 @@ spec:
470488
properties:
471489
name:
472490
description: name is the resource name in the PC
491+
minLength: 1
473492
type: string
474493
type:
475494
description: Type is the identifier type to use for this resource.
@@ -479,10 +498,18 @@ spec:
479498
type: string
480499
uuid:
481500
description: uuid is the UUID of the resource in the PC.
501+
format: uuid
502+
maxLength: 36
503+
minLength: 36
482504
type: string
483505
required:
484506
- type
485507
type: object
508+
x-kubernetes-validations:
509+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
510+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
511+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
512+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
486513
subnets:
487514
description: |-
488515
subnet identifies the network subnet to use for the machine.
@@ -492,6 +519,7 @@ spec:
492519
properties:
493520
name:
494521
description: name is the resource name in the PC
522+
minLength: 1
495523
type: string
496524
type:
497525
description: Type is the identifier type to use for this resource.
@@ -501,10 +529,18 @@ spec:
501529
type: string
502530
uuid:
503531
description: uuid is the UUID of the resource in the PC.
532+
format: uuid
533+
maxLength: 36
534+
minLength: 36
504535
type: string
505536
required:
506537
- type
507538
type: object
539+
x-kubernetes-validations:
540+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
541+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
542+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
543+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
508544
maxItems: 16
509545
type: array
510546
systemDiskSize:

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ spec:
9090
properties:
9191
name:
9292
description: name is the resource name in the PC
93+
minLength: 1
9394
type: string
9495
type:
9596
description: Type is the identifier type to use for this resource.
@@ -99,10 +100,18 @@ spec:
99100
type: string
100101
uuid:
101102
description: uuid is the UUID of the resource in the PC.
103+
format: uuid
104+
maxLength: 36
105+
minLength: 36
102106
type: string
103107
required:
104108
- type
105109
type: object
110+
x-kubernetes-validations:
111+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
112+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
113+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
114+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
106115
gpus:
107116
description: List of GPU devices that need to be added to the machines.
108117
items:
@@ -132,6 +141,7 @@ spec:
132141
properties:
133142
name:
134143
description: name is the resource name in the PC
144+
minLength: 1
135145
type: string
136146
type:
137147
description: Type is the identifier type to use for this resource.
@@ -141,10 +151,18 @@ spec:
141151
type: string
142152
uuid:
143153
description: uuid is the UUID of the resource in the PC.
154+
format: uuid
155+
maxLength: 36
156+
minLength: 36
144157
type: string
145158
required:
146159
- type
147160
type: object
161+
x-kubernetes-validations:
162+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
163+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
164+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
165+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
148166
imageLookup:
149167
description: imageLookup is a container that holds how to look up vm images for the cluster.
150168
properties:
@@ -184,6 +202,7 @@ spec:
184202
properties:
185203
name:
186204
description: name is the resource name in the PC
205+
minLength: 1
187206
type: string
188207
type:
189208
description: Type is the identifier type to use for this resource.
@@ -193,10 +212,18 @@ spec:
193212
type: string
194213
uuid:
195214
description: uuid is the UUID of the resource in the PC.
215+
format: uuid
216+
maxLength: 36
217+
minLength: 36
196218
type: string
197219
required:
198220
- type
199221
type: object
222+
x-kubernetes-validations:
223+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
224+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
225+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
226+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
200227
subnets:
201228
description: |-
202229
subnet identifies the network subnet to use for the machine.
@@ -206,6 +233,7 @@ spec:
206233
properties:
207234
name:
208235
description: name is the resource name in the PC
236+
minLength: 1
209237
type: string
210238
type:
211239
description: Type is the identifier type to use for this resource.
@@ -215,10 +243,18 @@ spec:
215243
type: string
216244
uuid:
217245
description: uuid is the UUID of the resource in the PC.
246+
format: uuid
247+
maxLength: 36
248+
minLength: 36
218249
type: string
219250
required:
220251
- type
221252
type: object
253+
x-kubernetes-validations:
254+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
255+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
256+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
257+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
222258
maxItems: 16
223259
type: array
224260
systemDiskSize:

0 commit comments

Comments
 (0)