Skip to content

Commit 3fecc2c

Browse files
fix(bumpup): CAPX, Prism-Go-Client, CCM version bumup (#1393)
fix(bumpup): CAPX, Prism-Go-Client, CCM version bumup
1 parent 520296f commit 3fecc2c

File tree

18 files changed

+166
-54
lines changed

18 files changed

+166
-54
lines changed

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/conditions.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ const (
5454

5555
const (
5656
// PrismCentralClientCondition indicates the status of the client used to connect to Prism Central
57-
PrismCentralClientCondition capiv1.ConditionType = "PrismClientInit"
58-
PrismCentralV4ClientCondition capiv1.ConditionType = "PrismClientV4Init"
57+
PrismCentralClientCondition capiv1.ConditionType = "PrismClientInit"
58+
PrismCentralV4ClientCondition capiv1.ConditionType = "PrismClientV4Init"
59+
PrismCentralConvergedV4ClientCondition capiv1.ConditionType = "PrismClientConvergedV4Init"
5960

60-
PrismCentralClientInitializationFailed = "PrismClientInitFailed"
61-
PrismCentralV4ClientInitializationFailed = "PrismClientV4InitFailed"
61+
PrismCentralClientInitializationFailed = "PrismClientInitFailed"
62+
PrismCentralV4ClientInitializationFailed = "PrismClientV4InitFailed"
63+
PrismCentralConvergedV4ClientInitializationFailed = "PrismClientConvergedV4InitFailed"
6264
)
6365

6466
const (

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanix_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ const (
6161

6262
// NutanixResourceIdentifier holds the identity of a Nutanix PC resource (cluster, image, subnet, etc.)
6363
// +union
64+
// +kubebuilder:validation:XValidation:rule="self.type == 'name' ? has(self.name) : !has(self.name)",message="'name' must be set when type is 'name', and forbidden otherwise"
65+
// +kubebuilder:validation:XValidation:rule="self.type == 'uuid' ? has(self.uuid) && self.uuid.contains('-') : !has(self.uuid)",message="'uuid' must be set when type is 'uuid', and forbidden otherwise"
6466
type NutanixResourceIdentifier struct {
6567
// Type is the identifier type to use for this resource.
6668
// +kubebuilder:validation:Required
@@ -69,10 +71,14 @@ type NutanixResourceIdentifier struct {
6971

7072
// uuid is the UUID of the resource in the PC.
7173
// +optional
74+
// +kubebuilder:validation:Format=uuid
75+
// +kubebuilder:validation:MaxLength=36
76+
// +kubebuilder:validation:MinLength=36
7277
UUID *string `json:"uuid,omitempty"`
7378

7479
// name is the resource name in the PC
7580
// +optional
81+
// +kubebuilder:validation:MinLength=1
7682
Name *string `json:"name,omitempty"`
7783
}
7884

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixfailuredomain_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const (
3131
)
3232

3333
// NutanixFailureDomainSpec defines the desired state of NutanixFailureDomain.
34+
// +kubebuilder:validation:XValidation:rule="size(self.subnets) > 1 ? self.subnets.all(x, self.subnets.exists_one(y, x == y)) : true",message="each subnet must be unique"
3435
type NutanixFailureDomainSpec struct {
3536
// prismElementCluster is to identify the Prism Element cluster in the Prism Central for the failure domain.
3637
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="prismElementCluster is immutable once set"
@@ -42,6 +43,7 @@ type NutanixFailureDomainSpec struct {
4243
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="subnets is immutable once set"
4344
// +kubebuilder:validation:Required
4445
// +kubebuilder:validation:MinItems=1
46+
// +kubebuilder:validation:MaxItems=32
4547
Subnets []NutanixResourceIdentifier `json:"subnets"`
4648
}
4749

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixmachine_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ type NutanixImageLookup struct {
9898

9999
// NutanixMachineSpec defines the desired state of NutanixMachine
100100
// +kubebuilder:validation:XValidation:rule="has(self.image) != has(self.imageLookup)",message="Either 'image' or 'imageLookup' must be set, but not both"
101+
// +kubebuilder:validation:XValidation:rule="has(self.subnet) && size(self.subnet) > 1 ? self.subnet.all(x, self.subnet.exists_one(y, x == y)) : true",message="each subnet must be unique"
101102
type NutanixMachineSpec struct {
102103
// SPEC FIELDS - desired state of NutanixMachine
103104
// Important: Run "make" to regenerate code after modifying this file
@@ -136,6 +137,7 @@ type NutanixMachineSpec struct {
136137
// subnet is to identify the cluster's network subnet to use for the Machine's VM
137138
// The cluster identifier (uuid or name) can be obtained from the Prism Central console
138139
// or using the prism_central API.
140+
// +kubebuilder:validation:MaxItems=32
139141
// +kubebuilder:validation:Optional
140142
Subnets []NutanixResourceIdentifier `json:"subnet,omitempty"`
141143
// List of categories that need to be added to the machines. Categories must already exist in Prism Central

api/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api
55

6-
go 1.23.0
6+
go 1.24
77

88
toolchain go1.25.3
99

@@ -15,7 +15,7 @@ require (
1515
github.com/aws/aws-sdk-go-v2/service/eks v1.74.2
1616
github.com/blang/semver/v4 v4.0.0
1717
github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common v0.7.0
18-
github.com/nutanix-cloud-native/prism-go-client v0.5.4
18+
github.com/nutanix-cloud-native/prism-go-client v0.6.0
1919
github.com/onsi/gomega v1.38.2
2020
github.com/pkg/errors v0.9.1
2121
github.com/stretchr/testify v1.11.1

api/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
8181
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
8282
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
8383
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
84-
github.com/nutanix-cloud-native/prism-go-client v0.5.4 h1:MUZ3dSDRhBQWAYn1HQ0JRb/O0N13GILwiMHMlMT92Zo=
85-
github.com/nutanix-cloud-native/prism-go-client v0.5.4/go.mod h1:N/O9fz5fimjb30RxlPbKbGs/Z2lqMgDqrb6CrsZvQrA=
84+
github.com/nutanix-cloud-native/prism-go-client v0.6.0 h1:aNWmQaVZnjfY7g5hxfBv0t+bpA4HlTNGHMU1NJeXKlA=
85+
github.com/nutanix-cloud-native/prism-go-client v0.6.0/go.mod h1:MGMzqONi2f9aZHeWwQYwL5j/r6Kxv56g6VIvkVFIlbU=
8686
github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE=
8787
github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw=
8888
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ spec:
398398
properties:
399399
name:
400400
description: name is the resource name in the PC
401+
minLength: 1
401402
type: string
402403
type:
403404
description: Type is the identifier type to use for this resource.
@@ -407,10 +408,18 @@ spec:
407408
type: string
408409
uuid:
409410
description: uuid is the UUID of the resource in the PC.
411+
format: uuid
412+
maxLength: 36
413+
minLength: 36
410414
type: string
411415
required:
412416
- type
413417
type: object
418+
x-kubernetes-validations:
419+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
420+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
421+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
422+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
414423
gpus:
415424
description: List of GPU devices that need to be added to the machines.
416425
items:
@@ -440,6 +449,7 @@ spec:
440449
properties:
441450
name:
442451
description: name is the resource name in the PC
452+
minLength: 1
443453
type: string
444454
type:
445455
description: Type is the identifier type to use for this resource.
@@ -449,10 +459,18 @@ spec:
449459
type: string
450460
uuid:
451461
description: uuid is the UUID of the resource in the PC.
462+
format: uuid
463+
maxLength: 36
464+
minLength: 36
452465
type: string
453466
required:
454467
- type
455468
type: object
469+
x-kubernetes-validations:
470+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
471+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
472+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
473+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
456474
imageLookup:
457475
description: imageLookup is a container that holds how to look up vm images for the cluster.
458476
properties:
@@ -492,6 +510,7 @@ spec:
492510
properties:
493511
name:
494512
description: name is the resource name in the PC
513+
minLength: 1
495514
type: string
496515
type:
497516
description: Type is the identifier type to use for this resource.
@@ -501,10 +520,18 @@ spec:
501520
type: string
502521
uuid:
503522
description: uuid is the UUID of the resource in the PC.
523+
format: uuid
524+
maxLength: 36
525+
minLength: 36
504526
type: string
505527
required:
506528
- type
507529
type: object
530+
x-kubernetes-validations:
531+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
532+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
533+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
534+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
508535
subnets:
509536
description: |-
510537
subnet identifies the network subnet to use for the machine.
@@ -514,6 +541,7 @@ spec:
514541
properties:
515542
name:
516543
description: name is the resource name in the PC
544+
minLength: 1
517545
type: string
518546
type:
519547
description: Type is the identifier type to use for this resource.
@@ -523,10 +551,18 @@ spec:
523551
type: string
524552
uuid:
525553
description: uuid is the UUID of the resource in the PC.
554+
format: uuid
555+
maxLength: 36
556+
minLength: 36
526557
type: string
527558
required:
528559
- type
529560
type: object
561+
x-kubernetes-validations:
562+
- message: '''name'' must be set when type is ''name'', and forbidden otherwise'
563+
rule: 'self.type == ''name'' ? has(self.name) : !has(self.name)'
564+
- message: '''uuid'' must be set when type is ''uuid'', and forbidden otherwise'
565+
rule: 'self.type == ''uuid'' ? has(self.uuid) && self.uuid.contains(''-'') : !has(self.uuid)'
530566
maxItems: 16
531567
type: array
532568
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:

charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/nutanix-cluster-class.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ spec:
344344
spec:
345345
bootType: legacy
346346
image:
347-
name: ""
347+
name: placeholder-image
348348
type: name
349349
memorySize: 4Gi
350350
systemDiskSize: 40Gi
@@ -362,7 +362,7 @@ spec:
362362
spec:
363363
bootType: legacy
364364
image:
365-
name: ""
365+
name: placeholder-image
366366
type: name
367367
memorySize: 4Gi
368368
systemDiskSize: 40Gi

0 commit comments

Comments
 (0)