@@ -409,12 +409,12 @@ type MachineDeploymentClass struct {
409
409
// bootstrap contains the bootstrap template reference to be used
410
410
// for the creation of worker Machines.
411
411
// +required
412
- Bootstrap MachineDeploymentClassBootstrapTemplate `json:"bootstrap"`
412
+ Bootstrap MachineDeploymentClassBootstrapTemplate `json:"bootstrap,omitempty,omitzero "`
413
413
414
414
// infrastructure contains the infrastructure template reference to be used
415
415
// for the creation of worker Machines.
416
416
// +required
417
- Infrastructure MachineDeploymentClassInfrastructureTemplate `json:"infrastructure"`
417
+ Infrastructure MachineDeploymentClassInfrastructureTemplate `json:"infrastructure,omitempty,omitzero "`
418
418
419
419
// healthCheck defines a MachineHealthCheck for this MachineDeploymentClass.
420
420
// +optional
@@ -714,12 +714,12 @@ type MachinePoolClass struct {
714
714
// bootstrap contains the bootstrap template reference to be used
715
715
// for the creation of the Machines in the MachinePool.
716
716
// +required
717
- Bootstrap MachinePoolClassBootstrapTemplate `json:"bootstrap"`
717
+ Bootstrap MachinePoolClassBootstrapTemplate `json:"bootstrap,omitempty,omitzero "`
718
718
719
719
// infrastructure contains the infrastructure template reference to be used
720
720
// for the creation of the MachinePool.
721
721
// +required
722
- Infrastructure MachinePoolClassInfrastructureTemplate `json:"infrastructure"`
722
+ Infrastructure MachinePoolClassInfrastructureTemplate `json:"infrastructure,omitempty,omitzero "`
723
723
724
724
// failureDomains is the list of failure domains the MachinePool should be attached to.
725
725
// Must match a key in the FailureDomains map stored on the cluster object.
@@ -820,7 +820,7 @@ type ClusterClassVariable struct {
820
820
821
821
// schema defines the schema of the variable.
822
822
// +required
823
- Schema VariableSchema `json:"schema"`
823
+ Schema VariableSchema `json:"schema,omitempty,omitzero "`
824
824
}
825
825
826
826
// ClusterClassVariableMetadata is the metadata of a variable.
@@ -848,7 +848,7 @@ type VariableSchema struct {
848
848
// schema. The schema is a subset of the schema used in
849
849
// Kubernetes CRDs.
850
850
// +required
851
- OpenAPIV3Schema JSONSchemaProps `json:"openAPIV3Schema"`
851
+ OpenAPIV3Schema JSONSchemaProps `json:"openAPIV3Schema,omitempty,omitzero "`
852
852
}
853
853
854
854
// Adapted from https://github.com/kubernetes/apiextensions-apiserver/blob/v0.28.5/pkg/apis/apiextensions/v1/types_jsonschema.go#L40
@@ -1244,15 +1244,16 @@ type ClusterClassPatch struct {
1244
1244
type PatchDefinition struct {
1245
1245
// selector defines on which templates the patch should be applied.
1246
1246
// +required
1247
- Selector PatchSelector `json:"selector"`
1247
+ Selector PatchSelector `json:"selector,omitempty,omitzero "`
1248
1248
1249
1249
// jsonPatches defines the patches which should be applied on the templates
1250
1250
// matching the selector.
1251
1251
// Note: Patches will be applied in the order of the array.
1252
+ // +kubebuilder:validation:MinItems=1
1252
1253
// +kubebuilder:validation:MaxItems=100
1253
1254
// +required
1254
1255
// +listType=atomic
1255
- JSONPatches []JSONPatch `json:"jsonPatches"`
1256
+ JSONPatches []JSONPatch `json:"jsonPatches,omitempty "`
1256
1257
}
1257
1258
1258
1259
// PatchSelector defines on which templates the patch should be applied.
@@ -1586,7 +1587,7 @@ type ClusterClassStatusVariableDefinition struct {
1586
1587
1587
1588
// schema defines the schema of the variable.
1588
1589
// +required
1589
- Schema VariableSchema `json:"schema"`
1590
+ Schema VariableSchema `json:"schema,omitempty,omitzero "`
1590
1591
}
1591
1592
1592
1593
// GetV1Beta1Conditions returns the set of conditions for this object.
0 commit comments