Skip to content

Commit c4c1dd0

Browse files
committed
Fix godoc manually by simply replacing existing comments
1 parent da9bc79 commit c4c1dd0

File tree

65 files changed

+696
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+696
-677
lines changed

api/v1beta1/cluster_types.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ type ClusterSpec struct {
466466
// +optional
467467
Paused bool `json:"paused,omitempty"`
468468

469-
// Cluster network configuration.
469+
// clusterNetwork represents the cluster network configuration.
470470
// +optional
471471
ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"`
472472

@@ -515,7 +515,7 @@ type ClusterAvailabilityGate struct {
515515

516516
// Topology encapsulates the information of the managed resources.
517517
type Topology struct {
518-
// The name of the ClusterClass object to create the topology.
518+
// class is the name of the ClusterClass object to create the topology.
519519
Class string `json:"class"`
520520

521521
// classNamespace is the namespace of the ClusterClass object to create the topology.
@@ -527,7 +527,7 @@ type Topology struct {
527527
// +kubebuilder:validation:Pattern=`^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$`
528528
ClassNamespace string `json:"classNamespace,omitempty"`
529529

530-
// The Kubernetes version of the cluster.
530+
// version is the Kubernetes version of the cluster.
531531
Version string `json:"version"`
532532

533533
// rolloutAfter performs a rollout of the entire cluster one component at a time,
@@ -667,14 +667,14 @@ type MachineDeploymentTopology struct {
667667
// +optional
668668
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
669669

670-
// Minimum number of seconds for which a newly created machine should
670+
// minReadySeconds is the minimum number of seconds for which a newly created machine should
671671
// be ready.
672672
// Defaults to 0 (machine will be considered available as soon as it
673673
// is ready)
674674
// +optional
675675
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
676676

677-
// The deployment strategy to use to replace existing machines with
677+
// strategy is the deployment strategy to use to replace existing machines with
678678
// new ones.
679679
// +optional
680680
Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"`
@@ -744,7 +744,7 @@ type MachinePoolTopology struct {
744744
// +optional
745745
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
746746

747-
// Minimum number of seconds for which a newly created machine pool should
747+
// minReadySeconds is the minimum number of seconds for which a newly created machine pool should
748748
// be ready.
749749
// Defaults to 0 (machine will be considered available as soon as it
750750
// is ready)
@@ -825,15 +825,15 @@ type ClusterNetwork struct {
825825
// +optional
826826
APIServerPort *int32 `json:"apiServerPort,omitempty"`
827827

828-
// The network ranges from which service VIPs are allocated.
828+
// services is the network ranges from which service VIPs are allocated.
829829
// +optional
830830
Services *NetworkRanges `json:"services,omitempty"`
831831

832-
// The network ranges from which Pod networks are allocated.
832+
// pods is the network ranges from which Pod networks are allocated.
833833
// +optional
834834
Pods *NetworkRanges `json:"pods,omitempty"`
835835

836-
// Domain name for services.
836+
// serviceDomain is the domain name for services.
837837
// +optional
838838
ServiceDomain string `json:"serviceDomain,omitempty"`
839839
}
@@ -1008,10 +1008,10 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase {
10081008

10091009
// APIEndpoint represents a reachable Kubernetes API endpoint.
10101010
type APIEndpoint struct {
1011-
// The hostname on which the API server is serving.
1011+
// host is the hostname on which the API server is serving.
10121012
Host string `json:"host"`
10131013

1014-
// The port on which the API server is serving.
1014+
// port is the port on which the API server is serving.
10151015
Port int32 `json:"port"`
10161016
}
10171017

api/v1beta1/clusterclass_types.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ type MachineDeploymentClass struct {
243243
// +optional
244244
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
245245

246-
// Minimum number of seconds for which a newly created machine should
246+
// minReadySeconds is the minimum number of seconds for which a newly created machine should
247247
// be ready.
248248
// Defaults to 0 (machine will be considered available as soon as it
249249
// is ready)
250250
// NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
251251
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
252252

253-
// The deployment strategy to use to replace existing machines with
253+
// strategy is the deployment strategy to use to replace existing machines with
254254
// new ones.
255255
// NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
256256
Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"`
@@ -377,7 +377,7 @@ type MachinePoolClass struct {
377377
// +optional
378378
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
379379

380-
// Minimum number of seconds for which a newly created machine pool should
380+
// minReadySeconds is the minimum number of seconds for which a newly created machine pool should
381381
// be ready.
382382
// Defaults to 0 (machine will be considered available as soon as it
383383
// is ready)
@@ -452,7 +452,7 @@ type ClusterClassVariable struct {
452452
//
453453
// Deprecated: This struct is deprecated and is going to be removed in the next apiVersion.
454454
type ClusterClassVariableMetadata struct {
455-
// Map of string keys and values that can be used to organize and categorize
455+
// labels is a map of string keys and values that can be used to organize and categorize
456456
// (scope and select) variables.
457457
// +optional
458458
Labels map[string]string `json:"labels,omitempty"`
@@ -673,7 +673,7 @@ type JSONSchemaProps struct {
673673
// VariableSchemaMetadata is the metadata of a variable or a nested field within a variable.
674674
// It can be used to add additional data for higher level tools.
675675
type VariableSchemaMetadata struct {
676-
// Map of string keys and values that can be used to organize and categorize
676+
// labels is a map of string keys and values that can be used to organize and categorize
677677
// (scope and select) variables.
678678
// +optional
679679
Labels map[string]string `json:"labels,omitempty"`

api/v1beta1/common_types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ const (
273273

274274
// MachineAddress contains information for the node's address.
275275
type MachineAddress struct {
276-
// Machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS.
276+
// type is the machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS.
277277
Type MachineAddressType `json:"type"`
278278

279-
// The machine address.
279+
// address is the machine address.
280280
Address string `json:"address"`
281281
}
282282

@@ -305,7 +305,7 @@ type MachineAddresses []MachineAddress
305305
// In future versions, controller-tools@v2 might allow overriding the type and validation for embedded
306306
// types. When that happens, this hack should be revisited.
307307
type ObjectMeta struct {
308-
// Map of string keys and values that can be used to organize and categorize
308+
// labels is a map of string keys and values that can be used to organize and categorize
309309
// (scope and select) objects. May match selectors of replication controllers
310310
// and services.
311311
// More info: http://kubernetes.io/docs/user-guide/labels

api/v1beta1/condition_types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ type Condition struct {
6767
// +optional
6868
Severity ConditionSeverity `json:"severity,omitempty"`
6969

70-
// Last time the condition transitioned from one status to another.
70+
// lastTransitionTime is the last time the condition transitioned from one status to another.
7171
// This should be when the underlying condition changed. If that is not known, then using the time when
7272
// the API field changed is acceptable.
7373
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
7474

75-
// The reason for the condition's last transition in CamelCase.
75+
// reason is the reason for the condition's last transition in CamelCase.
7676
// The specific API may choose whether or not this field is considered a guaranteed API.
7777
// This field may be empty.
7878
// +optional
7979
Reason string `json:"reason,omitempty"`
8080

81-
// A human readable message indicating details about the transition.
81+
// message is a human readable message indicating details about the transition.
8282
// This field may be empty.
8383
// +optional
8484
Message string `json:"message,omitempty"`

api/v1beta1/machinedeployment_types.go

+15-15
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ type MachineDeploymentSpec struct {
244244
// +kubebuilder:validation:MinLength=1
245245
ClusterName string `json:"clusterName"`
246246

247-
// Number of desired machines.
247+
// replicas is the number of desired machines.
248248
// This is a pointer to distinguish between explicit zero and not specified.
249249
//
250250
// Defaults to:
@@ -273,15 +273,15 @@ type MachineDeploymentSpec struct {
273273
// +optional
274274
RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"`
275275

276-
// Label selector for machines. Existing MachineSets whose machines are
276+
// selector is the label selector for machines. Existing MachineSets whose machines are
277277
// selected by this will be the ones affected by this deployment.
278278
// It must match the machine template's labels.
279279
Selector metav1.LabelSelector `json:"selector"`
280280

281281
// template describes the machines that will be created.
282282
Template MachineTemplateSpec `json:"template"`
283283

284-
// The deployment strategy to use to replace existing machines with
284+
// strategy is the deployment strategy to use to replace existing machines with
285285
// new ones.
286286
// +optional
287287
Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"`
@@ -296,7 +296,7 @@ type MachineDeploymentSpec struct {
296296
// +optional
297297
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
298298

299-
// The number of old MachineSets to retain to allow rollback.
299+
// revisionHistoryLimit is the number of old MachineSets to retain to allow rollback.
300300
// This is a pointer to distinguish between explicit zero and not specified.
301301
// Defaults to 1.
302302
//
@@ -305,11 +305,11 @@ type MachineDeploymentSpec struct {
305305
// +optional
306306
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
307307

308-
// Indicates that the deployment is paused.
308+
// paused indicates that the deployment is paused.
309309
// +optional
310310
Paused bool `json:"paused,omitempty"`
311311

312-
// The maximum time in seconds for a deployment to make progress before it
312+
// progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it
313313
// is considered to be failed. The deployment controller will continue to
314314
// process failed deployments and a condition with a ProgressDeadlineExceeded
315315
// reason will be surfaced in the deployment status. Note that progress will
@@ -334,7 +334,7 @@ type MachineDeploymentStrategy struct {
334334
// +optional
335335
Type MachineDeploymentStrategyType `json:"type,omitempty"`
336336

337-
// Rolling update config params. Present only if
337+
// rollingUpdate is the rolling update config params. Present only if
338338
// MachineDeploymentStrategyType = RollingUpdate.
339339
// +optional
340340
RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"`
@@ -351,7 +351,7 @@ type MachineDeploymentStrategy struct {
351351

352352
// MachineRollingUpdateDeployment is used to control the desired behavior of rolling update.
353353
type MachineRollingUpdateDeployment struct {
354-
// The maximum number of machines that can be unavailable during the update.
354+
// maxUnavailable is the maximum number of machines that can be unavailable during the update.
355355
// Value can be an absolute number (ex: 5) or a percentage of desired
356356
// machines (ex: 10%).
357357
// Absolute number is calculated from percentage by rounding down.
@@ -366,7 +366,7 @@ type MachineRollingUpdateDeployment struct {
366366
// +optional
367367
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
368368

369-
// The maximum number of machines that can be scheduled above the
369+
// maxSurge is the maximum number of machines that can be scheduled above the
370370
// desired number of machines.
371371
// Value can be an absolute number (ex: 5) or a percentage of
372372
// desired machines (ex: 10%).
@@ -446,7 +446,7 @@ type MachineNamingStrategy struct {
446446

447447
// MachineDeploymentStatus defines the observed state of MachineDeployment.
448448
type MachineDeploymentStatus struct {
449-
// The generation observed by the deployment controller.
449+
// observedGeneration is the generation observed by the deployment controller.
450450
// +optional
451451
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
452452

@@ -456,26 +456,26 @@ type MachineDeploymentStatus struct {
456456
// +optional
457457
Selector string `json:"selector,omitempty"`
458458

459-
// Total number of non-terminated machines targeted by this deployment
459+
// replicas is the total number of non-terminated machines targeted by this deployment
460460
// (their labels match the selector).
461461
// +optional
462462
Replicas int32 `json:"replicas"`
463463

464-
// Total number of non-terminated machines targeted by this deployment
464+
// updatedReplicas is the total number of non-terminated machines targeted by this deployment
465465
// that have the desired template spec.
466466
// +optional
467467
UpdatedReplicas int32 `json:"updatedReplicas"`
468468

469-
// Total number of ready machines targeted by this deployment.
469+
// readyReplicas is the total number of ready machines targeted by this deployment.
470470
// +optional
471471
ReadyReplicas int32 `json:"readyReplicas"`
472472

473-
// Total number of available machines (ready for at least minReadySeconds)
473+
// availableReplicas is the total number of available machines (ready for at least minReadySeconds)
474474
// targeted by this deployment.
475475
// +optional
476476
AvailableReplicas int32 `json:"availableReplicas"`
477477

478-
// Total number of unavailable machines targeted by this deployment.
478+
// unavailableReplicas is the total number of unavailable machines targeted by this deployment.
479479
// This is the total number of machines that are still required for
480480
// the deployment to have 100% available capacity. They may either
481481
// be machines that are running but not yet available or machines

api/v1beta1/machinehealthcheck_types.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type MachineHealthCheckSpec struct {
5555
// +kubebuilder:validation:MinLength=1
5656
ClusterName string `json:"clusterName"`
5757

58-
// Label selector to match machines whose health will be exercised
58+
// selector is a label selector to match machines whose health will be exercised
5959
Selector metav1.LabelSelector `json:"selector"`
6060

6161
// unhealthyConditions contains a list of the conditions that determine
@@ -135,12 +135,12 @@ type UnhealthyCondition struct {
135135

136136
// MachineHealthCheckStatus defines the observed state of MachineHealthCheck.
137137
type MachineHealthCheckStatus struct {
138-
// total number of machines counted by this machine health check
138+
// expectedMachines is the total number of machines counted by this machine health check
139139
// +kubebuilder:validation:Minimum=0
140140
// +optional
141141
ExpectedMachines int32 `json:"expectedMachines"`
142142

143-
// total number of healthy machines counted by this machine health check
143+
// currentHealthy is the total number of healthy machines counted by this machine health check
144144
// +kubebuilder:validation:Minimum=0
145145
// +optional
146146
CurrentHealthy int32 `json:"currentHealthy"`
@@ -197,10 +197,10 @@ type MachineHealthCheck struct {
197197
metav1.TypeMeta `json:",inline"`
198198
metav1.ObjectMeta `json:"metadata,omitempty"`
199199

200-
// Specification of machine health check policy
200+
// spec is the specification of machine health check policy
201201
Spec MachineHealthCheckSpec `json:"spec,omitempty"`
202202

203-
// Most recently observed status of MachineHealthCheck resource
203+
// status is the most recently observed status of MachineHealthCheck resource
204204
Status MachineHealthCheckStatus `json:"status,omitempty"`
205205
}
206206

api/v1beta1/machineset_types.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ type MachineTemplateSpec struct {
241241
// +optional
242242
ObjectMeta `json:"metadata,omitempty"`
243243

244-
// Specification of the desired behavior of the machine.
244+
// spec is the specification of the desired behavior of the machine.
245245
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
246246
// +optional
247247
Spec MachineSpec `json:"spec,omitempty"`
@@ -290,18 +290,18 @@ type MachineSetStatus struct {
290290
// +optional
291291
Replicas int32 `json:"replicas"`
292292

293-
// The number of replicas that have labels matching the labels of the machine template of the MachineSet.
293+
// fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet.
294294
//
295295
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
296296
//
297297
// +optional
298298
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas"`
299299

300-
// The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready".
300+
// readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready".
301301
// +optional
302302
ReadyReplicas int32 `json:"readyReplicas"`
303303

304-
// The number of available replicas (ready for at least minReadySeconds) for this MachineSet.
304+
// availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet.
305305
// +optional
306306
AvailableReplicas int32 `json:"availableReplicas"`
307307

0 commit comments

Comments
 (0)