Skip to content

Commit 8863bd1

Browse files
authored
Merge pull request #11807 from tsuzu/fix-missing-or-unformatted-comments
🌱 Add missing comments with serialized prefix
2 parents 090dc80 + be7e672 commit 8863bd1

25 files changed

+235
-60
lines changed

api/v1beta1/cluster_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ type ClusterSpec struct {
484484
// +optional
485485
InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"`
486486

487-
// This encapsulates the topology for the cluster.
487+
// topology encapsulates the topology for the cluster.
488488
// NOTE: It is required to enable the ClusterTopology
489489
// feature gate flag to activate managed topologies support;
490490
// this feature is highly experimental, and parts of it might still be not implemented.
@@ -844,6 +844,7 @@ type ClusterNetwork struct {
844844

845845
// NetworkRanges represents ranges of network addresses.
846846
type NetworkRanges struct {
847+
// cidrBlocks is a list of CIDR blocks.
847848
CIDRBlocks []string `json:"cidrBlocks"`
848849
}
849850

api/v1beta1/clusterclass_types.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,15 @@ type MachineHealthCheckClass struct {
296296
// +optional
297297
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"`
298298

299-
// Any further remediation is only allowed if at most "MaxUnhealthy" machines selected by
299+
// maxUnhealthy specifies the maximum number of unhealthy machines allowed.
300+
// Any further remediation is only allowed if at most "maxUnhealthy" machines selected by
300301
// "selector" are not healthy.
301302
// +optional
302303
MaxUnhealthy *intstr.IntOrString `json:"maxUnhealthy,omitempty"`
303304

305+
// unhealthyRange specifies the range of unhealthy machines allowed.
304306
// Any further remediation is only allowed if the number of machines selected by "selector" as not healthy
305-
// is within the range of "UnhealthyRange". Takes precedence over MaxUnhealthy.
307+
// is within the range of "unhealthyRange". Takes precedence over maxUnhealthy.
306308
// Eg. "[3-5]" - This means that remediation will be allowed only when:
307309
// (a) there are at least 3 unhealthy machines (and)
308310
// (b) there are at most 5 unhealthy machines

api/v1beta1/machinehealthcheck_types.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ type MachineHealthCheckSpec struct {
6565
// +optional
6666
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"`
6767

68-
// Any further remediation is only allowed if at most "MaxUnhealthy" machines selected by
68+
// maxUnhealthy specifies the maximum number of unhealthy machines allowed.
69+
// Any further remediation is only allowed if at most "maxUnhealthy" machines selected by
6970
// "selector" are not healthy.
7071
//
7172
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10722 for more details.
7273
//
7374
// +optional
7475
MaxUnhealthy *intstr.IntOrString `json:"maxUnhealthy,omitempty"`
7576

77+
// unhealthyRange specifies the range of unhealthy machines allowed.
7678
// Any further remediation is only allowed if the number of machines selected by "selector" as not healthy
77-
// is within the range of "UnhealthyRange". Takes precedence over MaxUnhealthy.
79+
// is within the range of "unhealthyRange". Takes precedence over maxUnhealthy.
7880
// Eg. "[3-5]" - This means that remediation will be allowed only when:
7981
// (a) there are at least 3 unhealthy machines (and)
8082
// (b) there are at most 5 unhealthy machines
@@ -118,14 +120,20 @@ type MachineHealthCheckSpec struct {
118120
// specified as a duration. When the named condition has been in the given
119121
// status for at least the timeout value, a node is considered unhealthy.
120122
type UnhealthyCondition struct {
123+
// type of Node condition
121124
// +kubebuilder:validation:Type=string
122125
// +kubebuilder:validation:MinLength=1
123126
Type corev1.NodeConditionType `json:"type"`
124127

128+
// status of the condition, one of True, False, Unknown.
125129
// +kubebuilder:validation:Type=string
126130
// +kubebuilder:validation:MinLength=1
127131
Status corev1.ConditionStatus `json:"status"`
128132

133+
// timeout is the duration that a node must be in a given status for,
134+
// after which the node is considered unhealthy.
135+
// For example, with a value of "1h", the node must match the status
136+
// for at least 1 hour before being considered unhealthy.
129137
Timeout metav1.Duration `json:"timeout"`
130138
}
131139

api/v1beta1/machineset_types.go

+10
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ type MachineSetStatus struct {
309309
// +optional
310310
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
311311

312+
// failureReason will be set in the event that there is a terminal problem
313+
// reconciling the Machine and will contain a succinct value suitable
314+
// for machine interpretation.
315+
//
312316
// In the event that there is a terminal problem reconciling the
313317
// replicas, both FailureReason and FailureMessage will be set. FailureReason
314318
// will be populated with a succinct value suitable for machine
@@ -332,10 +336,16 @@ type MachineSetStatus struct {
332336
//
333337
// +optional
334338
FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"`
339+
340+
// failureMessage will be set in the event that there is a terminal problem
341+
// reconciling the Machine and will contain a more verbose string suitable
342+
// for logging and human consumption.
343+
//
335344
// 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.
336345
//
337346
// +optional
338347
FailureMessage *string `json:"failureMessage,omitempty"`
348+
339349
// conditions defines current service state of the MachineSet.
340350
// +optional
341351
Conditions Conditions `json:"conditions,omitempty"`

api/v1beta1/zz_generated.openapi.go

+21-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/api/v1beta1/kubeadm_types.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,9 @@ type KubeConfigAuthExec struct {
662662
// KubeConfigAuthExecEnv is used for setting environment variables when executing an exec-based
663663
// credential plugin.
664664
type KubeConfigAuthExecEnv struct {
665-
Name string `json:"name"`
665+
// name of the environment variable
666+
Name string `json:"name"`
667+
// value of the environment variable
666668
Value string `json:"value"`
667669
}
668670

bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424

2525
// KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate.
2626
type KubeadmConfigTemplateSpec struct {
27+
// template defines the desired state of KubeadmConfigTemplate.
2728
Template KubeadmConfigTemplateResource `json:"template"`
2829
}
2930

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)