You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text: "optionalfields: field (NodeRegistration|LocalAPIEndpoint|Etcd|APIServer|ControllerManager|Scheduler|DNS|Discovery) is optional and should (be a pointer|have the omitempty tag)"
186
+
linters:
187
+
- kubeapilinter
188
+
- path: "api/core/v1beta2/cluster_types.go"
189
+
text: "optionalfields: field (ControlPlaneEndpoint|ControlPlane|Metadata) is optional and should (be a pointer|have the omitempty tag)"
190
+
linters:
191
+
- kubeapilinter
192
+
- path: "api/core/v1beta2/clusterclass_types.go"
193
+
text: "optionalfields: field (Workers|Metadata|DeprecatedV1Beta1Metadata) is optional and should (be a pointer|have the omitempty tag)"
// certificatesDir specifies where to store or look for all required certificates.
166
160
// NB: if not provided, this will default to `/etc/kubernetes/pki`
@@ -191,6 +185,7 @@ type ClusterConfiguration struct {
191
185
}
192
186
193
187
// ControlPlaneComponent holds settings common to control plane component of the cluster.
188
+
// +kubebuilder:validation:MinProperties=1
194
189
typeControlPlaneComponentstruct {
195
190
// extraArgs is a list of args to pass to the control plane component.
196
191
// The arg name must match the command line flag name except without leading dash(es).
@@ -229,7 +224,18 @@ type APIServer struct {
229
224
CertSANs []string`json:"certSANs,omitempty"`
230
225
}
231
226
227
+
// ControllerManager holds settings necessary for controller-manager deployments in the cluster.
228
+
typeControllerManagerstruct {
229
+
ControlPlaneComponent`json:",inline"`
230
+
}
231
+
232
+
// Scheduler holds settings necessary for scheduler deployments in the cluster.
233
+
typeSchedulerstruct {
234
+
ControlPlaneComponent`json:",inline"`
235
+
}
236
+
232
237
// DNS defines the DNS addon that should be used in the cluster.
238
+
// +kubebuilder:validation:MinProperties=1
233
239
typeDNSstruct {
234
240
// ImageMeta allows to customize the image used for the DNS component
235
241
ImageMeta`json:",inline"`
@@ -256,6 +262,7 @@ type ImageMeta struct {
256
262
}
257
263
258
264
// APIEndpoint struct contains elements of API server instance deployed on a node.
265
+
// +kubebuilder:validation:MinProperties=1
259
266
typeAPIEndpointstruct {
260
267
// advertiseAddress sets the IP address for the API server to advertise.
261
268
// +optional
@@ -271,9 +278,10 @@ type APIEndpoint struct {
271
278
}
272
279
273
280
// NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join".
281
+
// FIXME: somehow cannot apply this marker to this struct? // +kubebuilder:validation:MinProperties=1
282
+
// FIXME: maybe the marshal func? Check if we can just get rid of it => []Taints => *[]Taints
274
283
// Note: The NodeRegistrationOptions struct has to be kept in sync with the structs in MarshalJSON.
275
284
typeNodeRegistrationOptionsstruct {
276
-
277
285
// name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation.
278
286
// This field is also used in the CommonName field of the kubelet's client certificate to the API server.
279
287
// Defaults to the hostname of the node if not provided.
@@ -421,7 +429,6 @@ type BootstrapToken struct {
421
429
422
430
// Etcd contains elements describing Etcd configuration.
423
431
typeEtcdstruct {
424
-
425
432
// local provides configuration knobs for configuring the local etcd instance
426
433
// Local and External are mutually exclusive
427
434
// +optional
@@ -518,8 +525,7 @@ type JoinConfiguration struct {
518
525
// When used in the context of control plane nodes, NodeRegistration should remain consistent
519
526
// across both InitConfiguration and JoinConfiguration
Copy file name to clipboardExpand all lines: api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ type KubeadmConfigSpec struct {
116
116
117
117
// format specifies the output format of the bootstrap data
118
118
// +optional
119
-
FormatFormat`json:"format,omitempty"`// nolint:kubeapilinter // FIXME: Talk to Joel: optionalfields linter should be improved to detect enum on the type
119
+
FormatFormat`json:"format,omitempty"`
120
120
121
121
// verbosity is the number for the kubeadm log level verbosity.
122
122
// It overrides the `--v` flag in kubeadm commands.
@@ -630,7 +630,7 @@ type File struct {
630
630
631
631
// encoding specifies the encoding of the file contents.
632
632
// +optional
633
-
EncodingEncoding`json:"encoding,omitempty"`// nolint:kubeapilinter // FIXME: Talk to Joel: optionalfields linter should be improved to detect enum on the type
633
+
EncodingEncoding`json:"encoding,omitempty"`
634
634
635
635
// append specifies whether to append Content to existing file if Path exists.
// infrastructureRef is a required reference to a custom resource
486
486
// offered by an infrastructure provider.
@@ -538,7 +538,7 @@ type RolloutStrategy struct {
538
538
// "RollingUpdate".
539
539
// Default is RollingUpdate.
540
540
// +optional
541
-
TypeRolloutStrategyType`json:"type,omitempty"`// nolint:kubeapilinter // FIXME: Talk to Joel: optionalfields linter should be improved to detect enum on the type
541
+
TypeRolloutStrategyType`json:"type,omitempty"`
542
542
543
543
// rollingUpdate is the rolling update config params. Present only if
0 commit comments