Skip to content

Commit 145c98b

Browse files
committed
Mark all remaining ClusterClass array fields as atomic
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent ffa178c commit 145c98b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

api/core/v1beta2/clusterclass_types.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,15 @@ type ClusterClassSpec struct {
119119
// variables defines the variables which can be configured
120120
// in the Cluster topology and are then used in patches.
121121
// +optional
122+
// +listType=atomic
122123
// +kubebuilder:validation:MaxItems=1000
123124
Variables []ClusterClassVariable `json:"variables,omitempty"`
124125

125126
// patches defines the patches which are applied to customize
126127
// referenced templates of a ClusterClass.
127128
// Note: Patches will be applied in the order of the array.
128129
// +optional
130+
// +listType=atomic
129131
// +kubebuilder:validation:MaxItems=1000
130132
Patches []ClusterClassPatch `json:"patches,omitempty"`
131133
}
@@ -392,6 +394,7 @@ type MachineHealthCheckClass struct {
392394
// logical OR, i.e. if any of the conditions is met, the node is unhealthy.
393395
//
394396
// +optional
397+
// +listType=atomic
395398
// +kubebuilder:validation:MaxItems=100
396399
UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"`
397400

@@ -743,6 +746,7 @@ type JSONSchemaProps struct {
743746
// enum is the list of valid values of the variable.
744747
// NOTE: Can be set for all types.
745748
// +optional
749+
// +listType=atomic
746750
// +kubebuilder:validation:MaxItems=100
747751
Enum []apiextensionsv1.JSON `json:"enum,omitempty"`
748752

@@ -783,6 +787,7 @@ type JSONSchemaProps struct {
783787
// NOTE: This field uses PreserveUnknownFields and Schemaless,
784788
// because recursive validation is not possible.
785789
// +optional
790+
// +listType=atomic
786791
// +kubebuilder:pruning:PreserveUnknownFields
787792
// +kubebuilder:validation:Schemaless
788793
AllOf []JSONSchemaProps `json:"allOf,omitempty"`
@@ -791,6 +796,7 @@ type JSONSchemaProps struct {
791796
// NOTE: This field uses PreserveUnknownFields and Schemaless,
792797
// because recursive validation is not possible.
793798
// +optional
799+
// +listType=atomic
794800
// +kubebuilder:pruning:PreserveUnknownFields
795801
// +kubebuilder:validation:Schemaless
796802
OneOf []JSONSchemaProps `json:"oneOf,omitempty"`
@@ -799,6 +805,7 @@ type JSONSchemaProps struct {
799805
// NOTE: This field uses PreserveUnknownFields and Schemaless,
800806
// because recursive validation is not possible.
801807
// +optional
808+
// +listType=atomic
802809
// +kubebuilder:pruning:PreserveUnknownFields
803810
// +kubebuilder:validation:Schemaless
804811
AnyOf []JSONSchemaProps `json:"anyOf,omitempty"`
@@ -973,6 +980,7 @@ type ClusterClassPatch struct {
973980
// Note: Patches will be applied in the order of the array.
974981
// Note: Exactly one of Definitions or External must be set.
975982
// +optional
983+
// +listType=atomic
976984
// +kubebuilder:validation:MaxItems=100
977985
Definitions []PatchDefinition `json:"definitions,omitempty"`
978986

@@ -993,6 +1001,7 @@ type PatchDefinition struct {
9931001
// Note: Patches will be applied in the order of the array.
9941002
// +kubebuilder:validation:MaxItems=100
9951003
// +required
1004+
// +listType=atomic
9961005
JSONPatches []JSONPatch `json:"jsonPatches"`
9971006
}
9981007

@@ -1249,6 +1258,7 @@ type ClusterClassStatus struct {
12491258

12501259
// variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass.
12511260
// +optional
1261+
// +listType=atomic
12521262
// +kubebuilder:validation:MaxItems=1000
12531263
Variables []ClusterClassStatusVariable `json:"variables,omitempty"`
12541264

@@ -1294,8 +1304,9 @@ type ClusterClassStatusVariable struct {
12941304
DefinitionsConflict *bool `json:"definitionsConflict,omitempty"`
12951305

12961306
// definitions is a list of definitions for a variable.
1297-
// +kubebuilder:validation:MaxItems=100
12981307
// +required
1308+
// +listType=atomic
1309+
// +kubebuilder:validation:MaxItems=100
12991310
Definitions []ClusterClassStatusVariableDefinition `json:"definitions"`
13001311
}
13011312

0 commit comments

Comments
 (0)