Skip to content

Commit 600524b

Browse files
committed
Refactor godoc for API fields starting with field names
1 parent a3711b4 commit 600524b

File tree

58 files changed

+1266
-1266
lines changed

Some content is hidden

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

58 files changed

+1266
-1266
lines changed

api/v1beta1/cluster_types.go

+54-54
Large diffs are not rendered by default.

api/v1beta1/clusterclass_types.go

+119-119
Large diffs are not rendered by default.

api/v1beta1/common_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ type ObjectMeta struct {
312312
// +optional
313313
Labels map[string]string `json:"labels,omitempty"`
314314

315-
// Annotations is an unstructured key value map stored with a resource that may be
315+
// annotations is an unstructured key value map stored with a resource that may be
316316
// set by external tools to store and retrieve arbitrary metadata. They are not
317317
// queryable and should be preserved when modifying objects.
318318
// More info: http://kubernetes.io/docs/user-guide/annotations

api/v1beta1/condition_types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ type ConditionType string
5353

5454
// Condition defines an observation of a Cluster API resource operational state.
5555
type Condition struct {
56-
// Type of condition in CamelCase or in foo.example.com/CamelCase.
56+
// type of condition in CamelCase or in foo.example.com/CamelCase.
5757
// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
5858
// can be useful (see .node.status.conditions), the ability to deconflict is important.
5959
Type ConditionType `json:"type"`
6060

61-
// Status of the condition, one of True, False, Unknown.
61+
// status of the condition, one of True, False, Unknown.
6262
Status corev1.ConditionStatus `json:"status"`
6363

64-
// Severity provides an explicit classification of Reason code, so the users or machines can immediately
64+
// severity provides an explicit classification of Reason code, so the users or machines can immediately
6565
// understand the current situation and act accordingly.
6666
// The Severity field MUST be set only when Status=False.
6767
// +optional

api/v1beta1/machine_types.go

+23-23
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,24 @@ const (
9090

9191
// MachineSpec defines the desired state of Machine.
9292
type MachineSpec struct {
93-
// ClusterName is the name of the Cluster this object belongs to.
93+
// clusterName is the name of the Cluster this object belongs to.
9494
// +kubebuilder:validation:MinLength=1
9595
ClusterName string `json:"clusterName"`
9696

97-
// Bootstrap is a reference to a local struct which encapsulates
97+
// bootstrap is a reference to a local struct which encapsulates
9898
// fields to configure the Machine’s bootstrapping mechanism.
9999
Bootstrap Bootstrap `json:"bootstrap"`
100100

101-
// InfrastructureRef is a required reference to a custom resource
101+
// infrastructureRef is a required reference to a custom resource
102102
// offered by an infrastructure provider.
103103
InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"`
104104

105-
// Version defines the desired Kubernetes version.
105+
// version defines the desired Kubernetes version.
106106
// This field is meant to be optionally used by bootstrap providers.
107107
// +optional
108108
Version *string `json:"version,omitempty"`
109109

110-
// ProviderID is the identification ID of the machine provided by the provider.
110+
// providerID is the identification ID of the machine provided by the provider.
111111
// This field must match the provider ID as seen on the node object corresponding to this machine.
112112
// This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler
113113
// with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out
@@ -120,7 +120,7 @@ type MachineSpec struct {
120120
// +optional
121121
ProviderID *string `json:"providerID,omitempty"`
122122

123-
// FailureDomain is the failure domain the machine will be created in.
123+
// failureDomain is the failure domain the machine will be created in.
124124
// Must match a key in the FailureDomains map stored on the cluster object.
125125
// +optional
126126
FailureDomain *string `json:"failureDomain,omitempty"`
@@ -149,18 +149,18 @@ type MachineSpec struct {
149149
// +kubebuilder:validation:MaxItems=32
150150
ReadinessGates []MachineReadinessGate `json:"readinessGates,omitempty"`
151151

152-
// NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
152+
// nodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
153153
// The default value is 0, meaning that the node can be drained without any time limitations.
154154
// NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
155155
// +optional
156156
NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"`
157157

158-
// NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes
158+
// nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes
159159
// to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.
160160
// +optional
161161
NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"`
162162

163-
// NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine
163+
// nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine
164164
// hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely.
165165
// Defaults to 10 seconds.
166166
// +optional
@@ -185,20 +185,20 @@ type MachineReadinessGate struct {
185185

186186
// MachineStatus defines the observed state of Machine.
187187
type MachineStatus struct {
188-
// NodeRef will point to the corresponding Node if it exists.
188+
// nodeRef will point to the corresponding Node if it exists.
189189
// +optional
190190
NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"`
191191

192-
// NodeInfo is a set of ids/uuids to uniquely identify the node.
192+
// nodeInfo is a set of ids/uuids to uniquely identify the node.
193193
// More info: https://kubernetes.io/docs/concepts/nodes/node/#info
194194
// +optional
195195
NodeInfo *corev1.NodeSystemInfo `json:"nodeInfo,omitempty"`
196196

197-
// LastUpdated identifies when the phase of the Machine last transitioned.
197+
// lastUpdated identifies when the phase of the Machine last transitioned.
198198
// +optional
199199
LastUpdated *metav1.Time `json:"lastUpdated,omitempty"`
200200

201-
// FailureReason will be set in the event that there is a terminal problem
201+
// failureReason will be set in the event that there is a terminal problem
202202
// reconciling the Machine and will contain a succinct value suitable
203203
// for machine interpretation.
204204
//
@@ -217,7 +217,7 @@ type MachineStatus struct {
217217
// +optional
218218
FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"`
219219

220-
// FailureMessage will be set in the event that there is a terminal problem
220+
// failureMessage will be set in the event that there is a terminal problem
221221
// reconciling the Machine and will contain a more verbose string suitable
222222
// for logging and human consumption.
223223
//
@@ -236,34 +236,34 @@ type MachineStatus struct {
236236
// +optional
237237
FailureMessage *string `json:"failureMessage,omitempty"`
238238

239-
// Addresses is a list of addresses assigned to the machine.
239+
// addresses is a list of addresses assigned to the machine.
240240
// This field is copied from the infrastructure provider reference.
241241
// +optional
242242
Addresses MachineAddresses `json:"addresses,omitempty"`
243243

244-
// Phase represents the current phase of machine actuation.
244+
// phase represents the current phase of machine actuation.
245245
// E.g. Pending, Running, Terminating, Failed etc.
246246
// +optional
247247
Phase string `json:"phase,omitempty"`
248248

249-
// CertificatesExpiryDate is the expiry date of the machine certificates.
249+
// certificatesExpiryDate is the expiry date of the machine certificates.
250250
// This value is only set for control plane machines.
251251
// +optional
252252
CertificatesExpiryDate *metav1.Time `json:"certificatesExpiryDate,omitempty"`
253253

254-
// BootstrapReady is the state of the bootstrap provider.
254+
// bootstrapReady is the state of the bootstrap provider.
255255
// +optional
256256
BootstrapReady bool `json:"bootstrapReady"`
257257

258-
// InfrastructureReady is the state of the infrastructure provider.
258+
// infrastructureReady is the state of the infrastructure provider.
259259
// +optional
260260
InfrastructureReady bool `json:"infrastructureReady"`
261261

262-
// ObservedGeneration is the latest generation observed by the controller.
262+
// observedGeneration is the latest generation observed by the controller.
263263
// +optional
264264
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
265265

266-
// Conditions defines current service state of the Machine.
266+
// conditions defines current service state of the Machine.
267267
// +optional
268268
Conditions Conditions `json:"conditions,omitempty"`
269269

@@ -339,14 +339,14 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase {
339339

340340
// Bootstrap encapsulates fields to configure the Machine’s bootstrapping mechanism.
341341
type Bootstrap struct {
342-
// ConfigRef is a reference to a bootstrap provider-specific resource
342+
// configRef is a reference to a bootstrap provider-specific resource
343343
// that holds configuration details. The reference is optional to
344344
// allow users/operators to specify Bootstrap.DataSecretName without
345345
// the need of a controller.
346346
// +optional
347347
ConfigRef *corev1.ObjectReference `json:"configRef,omitempty"`
348348

349-
// DataSecretName is the name of the secret that stores the bootstrap data script.
349+
// dataSecretName is the name of the secret that stores the bootstrap data script.
350350
// If nil, the Machine should remain in the Pending state.
351351
// +optional
352352
DataSecretName *string `json:"dataSecretName,omitempty"`

api/v1beta1/machinedeployment_types.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const (
8181

8282
// MachineDeploymentSpec defines the desired state of MachineDeployment.
8383
type MachineDeploymentSpec struct {
84-
// ClusterName is the name of the Cluster this object belongs to.
84+
// clusterName is the name of the Cluster this object belongs to.
8585
// +kubebuilder:validation:MinLength=1
8686
ClusterName string `json:"clusterName"`
8787

@@ -105,7 +105,7 @@ type MachineDeploymentSpec struct {
105105
// +optional
106106
Replicas *int32 `json:"replicas,omitempty"`
107107

108-
// RolloutAfter is a field to indicate a rollout should be performed
108+
// rolloutAfter is a field to indicate a rollout should be performed
109109
// after the specified time even if no changes have been made to the
110110
// MachineDeployment.
111111
// Example: In the YAML the time can be specified in the RFC3339 format.
@@ -119,15 +119,15 @@ type MachineDeploymentSpec struct {
119119
// It must match the machine template's labels.
120120
Selector metav1.LabelSelector `json:"selector"`
121121

122-
// Template describes the machines that will be created.
122+
// template describes the machines that will be created.
123123
Template MachineTemplateSpec `json:"template"`
124124

125125
// The deployment strategy to use to replace existing machines with
126126
// new ones.
127127
// +optional
128128
Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"`
129129

130-
// MinReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available.
130+
// minReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available.
131131
// Defaults to 0 (machine will be considered available as soon as the Node is ready)
132132
// +optional
133133
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
@@ -161,7 +161,7 @@ type MachineDeploymentSpec struct {
161161
// MachineDeploymentStrategy describes how to replace existing machines
162162
// with new ones.
163163
type MachineDeploymentStrategy struct {
164-
// Type of deployment. Allowed values are RollingUpdate and OnDelete.
164+
// type of deployment. Allowed values are RollingUpdate and OnDelete.
165165
// The default is RollingUpdate.
166166
// +kubebuilder:validation:Enum=RollingUpdate;OnDelete
167167
// +optional
@@ -172,7 +172,7 @@ type MachineDeploymentStrategy struct {
172172
// +optional
173173
RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"`
174174

175-
// Remediation controls the strategy of remediating unhealthy machines
175+
// remediation controls the strategy of remediating unhealthy machines
176176
// and how remediating operations should occur during the lifecycle of the dependant MachineSets.
177177
// +optional
178178
Remediation *RemediationStrategy `json:"remediation,omitempty"`
@@ -215,7 +215,7 @@ type MachineRollingUpdateDeployment struct {
215215
// +optional
216216
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
217217

218-
// DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling.
218+
// deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling.
219219
// Valid values are "Random, "Newest", "Oldest"
220220
// When no value is supplied, the default DeletePolicy of MachineSet is used
221221
// +kubebuilder:validation:Enum=Random;Newest;Oldest
@@ -229,7 +229,7 @@ type MachineRollingUpdateDeployment struct {
229229

230230
// RemediationStrategy allows to define how the MachineSet can control scaling operations.
231231
type RemediationStrategy struct {
232-
// MaxInFlight determines how many in flight remediations should happen at the same time.
232+
// maxInFlight determines how many in flight remediations should happen at the same time.
233233
//
234234
// Remediation only happens on the MachineSet with the most current revision, while
235235
// older MachineSets (usually present during rollout operations) aren't allowed to remediate.
@@ -258,7 +258,7 @@ type MachineDeploymentStatus struct {
258258
// +optional
259259
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
260260

261-
// Selector is the same as the label selector but in the string format to avoid introspection
261+
// selector is the same as the label selector but in the string format to avoid introspection
262262
// by clients. The string will be in the same format as the query-param syntax.
263263
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
264264
// +optional
@@ -291,11 +291,11 @@ type MachineDeploymentStatus struct {
291291
// +optional
292292
UnavailableReplicas int32 `json:"unavailableReplicas"`
293293

294-
// Phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown).
294+
// phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown).
295295
// +optional
296296
Phase string `json:"phase,omitempty"`
297297

298-
// Conditions defines current service state of the MachineDeployment.
298+
// conditions defines current service state of the MachineDeployment.
299299
// +optional
300300
Conditions Conditions `json:"conditions,omitempty"`
301301

api/v1beta1/machinehealthcheck_types.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ var (
3636

3737
// MachineHealthCheckSpec defines the desired state of MachineHealthCheck.
3838
type MachineHealthCheckSpec struct {
39-
// ClusterName is the name of the Cluster this object belongs to.
39+
// clusterName is the name of the Cluster this object belongs to.
4040
// +kubebuilder:validation:MinLength=1
4141
ClusterName string `json:"clusterName"`
4242

4343
// Label selector to match machines whose health will be exercised
4444
Selector metav1.LabelSelector `json:"selector"`
4545

46-
// UnhealthyConditions contains a list of the conditions that determine
46+
// unhealthyConditions contains a list of the conditions that determine
4747
// whether a node is considered unhealthy. The conditions are combined in a
4848
// logical OR, i.e. if any of the conditions is met, the node is unhealthy.
4949
//
@@ -70,7 +70,7 @@ type MachineHealthCheckSpec struct {
7070
// +kubebuilder:validation:Pattern=^\[[0-9]+-[0-9]+\]$
7171
UnhealthyRange *string `json:"unhealthyRange,omitempty"`
7272

73-
// NodeStartupTimeout allows to set the maximum time for MachineHealthCheck
73+
// nodeStartupTimeout allows to set the maximum time for MachineHealthCheck
7474
// to consider a Machine unhealthy if a corresponding Node isn't associated
7575
// through a `Spec.ProviderID` field.
7676
//
@@ -85,7 +85,7 @@ type MachineHealthCheckSpec struct {
8585
// +optional
8686
NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"`
8787

88-
// RemediationTemplate is a reference to a remediation template
88+
// remediationTemplate is a reference to a remediation template
8989
// provided by an infrastructure provider.
9090
//
9191
// This field is completely optional, when filled, the MachineHealthCheck controller
@@ -130,21 +130,21 @@ type MachineHealthCheckStatus struct {
130130
// +optional
131131
CurrentHealthy int32 `json:"currentHealthy"`
132132

133-
// RemediationsAllowed is the number of further remediations allowed by this machine health check before
133+
// remediationsAllowed is the number of further remediations allowed by this machine health check before
134134
// maxUnhealthy short circuiting will be applied
135135
// +kubebuilder:validation:Minimum=0
136136
// +optional
137137
RemediationsAllowed int32 `json:"remediationsAllowed"`
138138

139-
// ObservedGeneration is the latest generation observed by the controller.
139+
// observedGeneration is the latest generation observed by the controller.
140140
// +optional
141141
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
142142

143-
// Targets shows the current list of machines the machine health check is watching
143+
// targets shows the current list of machines the machine health check is watching
144144
// +optional
145145
Targets []string `json:"targets,omitempty"`
146146

147-
// Conditions defines current service state of the MachineHealthCheck.
147+
// conditions defines current service state of the MachineHealthCheck.
148148
// +optional
149149
Conditions Conditions `json:"conditions,omitempty"`
150150

0 commit comments

Comments
 (0)