Skip to content

Commit ef7b306

Browse files
committed
fix: crd generation
1 parent 1e5e5d5 commit ef7b306

File tree

3 files changed

+70
-3
lines changed

3 files changed

+70
-3
lines changed

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,33 @@ spec:
384384
required:
385385
- type
386386
type: object
387+
imageLookup:
388+
description: imageLookup is a container that holds how to look up vm images for the cluster.
389+
properties:
390+
baseOS:
391+
description: |-
392+
BaseOS is the name of the base operating system to use for
393+
image lookup.
394+
minLength: 1
395+
type: string
396+
format:
397+
default: capx-{{.BaseOS}}-{{.K8sVersion}}-*
398+
description: |-
399+
Format is the naming format to look up the image for this
400+
machine It will be ignored if an explicit image is set. Supports
401+
substitutions for {{.BaseOS}} and {{.K8sVersion}} with the base OS and
402+
kubernetes version, respectively. The BaseOS will be the value in
403+
BaseOS and the K8sVersion is the value in the Machine .spec.version, with the v prefix removed.
404+
This is effectively the defined by the packages produced by kubernetes/release without v as a
405+
prefix: 1.13.0, 1.12.5-mybuild.1, or 1.17.3. For example, the default
406+
image format of {{.BaseOS}}-?{{.K8sVersion}}-* and BaseOS as "rhel-8.10" will end up
407+
searching for images that match the pattern rhel-8.10-1.30.5-* for a
408+
Machine that is targeting kubernetes v1.30.5. See
409+
also: https://golang.org/pkg/text/template/
410+
type: string
411+
required:
412+
- baseOS
413+
type: object
387414
memorySize:
388415
description: memorySize is the memory size (in Quantity format) of the VM
389416
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -449,13 +476,15 @@ spec:
449476
type: integer
450477
required:
451478
- cluster
452-
- image
453479
- memorySize
454480
- subnets
455481
- systemDiskSize
456482
- vcpuSockets
457483
- vcpusPerSocket
458484
type: object
485+
x-kubernetes-validations:
486+
- message: Either 'image' or 'imageLookup' must be set, but not both
487+
rule: has(self.image) != has(self.imageLookup)
459488
required:
460489
- machineDetails
461490
type: object

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,33 @@ spec:
126126
required:
127127
- type
128128
type: object
129+
imageLookup:
130+
description: imageLookup is a container that holds how to look up vm images for the cluster.
131+
properties:
132+
baseOS:
133+
description: |-
134+
BaseOS is the name of the base operating system to use for
135+
image lookup.
136+
minLength: 1
137+
type: string
138+
format:
139+
default: capx-{{.BaseOS}}-{{.K8sVersion}}-*
140+
description: |-
141+
Format is the naming format to look up the image for this
142+
machine It will be ignored if an explicit image is set. Supports
143+
substitutions for {{.BaseOS}} and {{.K8sVersion}} with the base OS and
144+
kubernetes version, respectively. The BaseOS will be the value in
145+
BaseOS and the K8sVersion is the value in the Machine .spec.version, with the v prefix removed.
146+
This is effectively the defined by the packages produced by kubernetes/release without v as a
147+
prefix: 1.13.0, 1.12.5-mybuild.1, or 1.17.3. For example, the default
148+
image format of {{.BaseOS}}-?{{.K8sVersion}}-* and BaseOS as "rhel-8.10" will end up
149+
searching for images that match the pattern rhel-8.10-1.30.5-* for a
150+
Machine that is targeting kubernetes v1.30.5. See
151+
also: https://golang.org/pkg/text/template/
152+
type: string
153+
required:
154+
- baseOS
155+
type: object
129156
memorySize:
130157
description: memorySize is the memory size (in Quantity format) of the VM
131158
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -191,13 +218,15 @@ spec:
191218
type: integer
192219
required:
193220
- cluster
194-
- image
195221
- memorySize
196222
- subnets
197223
- systemDiskSize
198224
- vcpuSockets
199225
- vcpusPerSocket
200226
type: object
227+
x-kubernetes-validations:
228+
- message: Either 'image' or 'imageLookup' must be set, but not both
229+
rule: has(self.image) != has(self.imageLookup)
201230
required:
202231
- machineDetails
203232
type: object

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 10 additions & 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)