Skip to content

Commit 1d48b0d

Browse files
committed
fix(api): regenerate deepcopy and sync Helm CRDs for Tolerations fields
Run make generate to add Tolerations deep-copy blocks to ImpVMClassSpec and ImpVMSpec, fixing a correctness bug with the *int64 pointer field in corev1.Toleration. Sync Helm chart CRDs to include the tolerations schema, preserving the helm.sh/resource-policy keep annotation.
1 parent 672a8b1 commit 1d48b0d

3 files changed

Lines changed: 100 additions & 0 deletions

File tree

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/imp-crds/templates/impvmclasses.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,49 @@ spec:
308308
- cool-down
309309
type: string
310310
type: object
311+
tolerations:
312+
description: |-
313+
Tolerations specify tolerations inherited by all VMs of this class.
314+
Merged additively with per-VM tolerations at schedule time.
315+
Same semantics as Pod.spec.tolerations.
316+
items:
317+
description: |-
318+
The pod this Toleration is attached to tolerates any taint that matches
319+
the triple <key,value,effect> using the matching operator <operator>.
320+
properties:
321+
effect:
322+
description: |-
323+
Effect indicates the taint effect to match. Empty means match all taint effects.
324+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
325+
type: string
326+
key:
327+
description: |-
328+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
329+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
330+
type: string
331+
operator:
332+
description: |-
333+
Operator represents a key's relationship to the value.
334+
Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
335+
Exists is equivalent to wildcard for value, so that a pod can
336+
tolerate all taints of a particular category.
337+
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
338+
type: string
339+
tolerationSeconds:
340+
description: |-
341+
TolerationSeconds represents the period of time the toleration (which must be
342+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
343+
it is not set, which means tolerate the taint forever (do not evict). Zero and
344+
negative values will be treated as 0 (evict immediately) by the system.
345+
format: int64
346+
type: integer
347+
value:
348+
description: |-
349+
Value is the taint value the toleration matches to.
350+
If the operator is Exists, the value should be empty, otherwise just a regular string.
351+
type: string
352+
type: object
353+
type: array
311354
vcpu:
312355
description: VCPU is the number of virtual CPUs allocated to each
313356
VM.

charts/imp-crds/templates/impvms.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,49 @@ spec:
571571
required:
572572
- name
573573
type: object
574+
tolerations:
575+
description: |-
576+
Tolerations allow this VM to be scheduled onto nodes with matching taints.
577+
Class tolerations are merged (additive union) with VM tolerations at schedule time.
578+
Same semantics as Pod.spec.tolerations.
579+
items:
580+
description: |-
581+
The pod this Toleration is attached to tolerates any taint that matches
582+
the triple <key,value,effect> using the matching operator <operator>.
583+
properties:
584+
effect:
585+
description: |-
586+
Effect indicates the taint effect to match. Empty means match all taint effects.
587+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
588+
type: string
589+
key:
590+
description: |-
591+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
592+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
593+
type: string
594+
operator:
595+
description: |-
596+
Operator represents a key's relationship to the value.
597+
Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
598+
Exists is equivalent to wildcard for value, so that a pod can
599+
tolerate all taints of a particular category.
600+
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
601+
type: string
602+
tolerationSeconds:
603+
description: |-
604+
TolerationSeconds represents the period of time the toleration (which must be
605+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
606+
it is not set, which means tolerate the taint forever (do not evict). Zero and
607+
negative values will be treated as 0 (evict immediately) by the system.
608+
format: int64
609+
type: integer
610+
value:
611+
description: |-
612+
Value is the taint value the toleration matches to.
613+
If the operator is Exists, the value should be empty, otherwise just a regular string.
614+
type: string
615+
type: object
616+
type: array
574617
userData:
575618
description: |-
576619
UserData is an optional cloud-init user-data payload. Off by default;

0 commit comments

Comments
 (0)