@@ -215,10 +215,12 @@ type ControlPlaneComponent struct {
215
215
// The arg name must match be the command line flag name except without leading dash(es).
216
216
// Extra arguments will override existing default arguments set by kubeadm.
217
217
// +optional
218
- // +listType=atomic
218
+ // +listType=map
219
+ // +listMapKey=name
220
+ // +listMapKey=value
219
221
// +kubebuilder:validation:MinItems=1
220
222
// +kubebuilder:validation:MaxItems=100
221
- // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="extraArgs name must be unique"
223
+ // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.name == y.name ))",message="extraArgs name must be unique"
222
224
ExtraArgs []Arg `json:"extraArgs,omitempty"`
223
225
224
226
// extraVolumes is an extra set of host volumes, mounted to the control plane component.
@@ -331,14 +333,16 @@ type NodeRegistrationOptions struct {
331
333
// The arg name must match be the command line flag name except without leading dash(es).
332
334
// Extra arguments will override existing default arguments set by kubeadm.
333
335
// +optional
334
- // +listType=atomic
336
+ // +listType=map
337
+ // +listMapKey=name
338
+ // +listMapKey=value
335
339
// +kubebuilder:validation:MinItems=1
336
340
// +kubebuilder:validation:MaxItems=100
337
- // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="kubeletExtraArgs name must be unique"
341
+ // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.name == y.name ))",message="kubeletExtraArgs name must be unique"
338
342
KubeletExtraArgs []Arg `json:"kubeletExtraArgs,omitempty"`
339
343
340
344
// ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'.
341
- // // Value 'all' ignores errors from all checks.
345
+ // Value 'all' ignores errors from all checks.
342
346
// +optional
343
347
// +kubebuilder:validation:MaxItems=50
344
348
// +kubebuilder:validation:items:MinLength=1
@@ -956,7 +960,7 @@ type Arg struct {
956
960
957
961
// value is the Value of the extraArg.
958
962
// +required
959
- // +kubebuilder:validation:MinLength=1
963
+ // +kubebuilder:validation:MinLength=0
960
964
// +kubebuilder:validation:MaxLength=1024
961
965
Value string `json:"value"`
962
966
}
0 commit comments