From a7e87495f6e3008e0328e7dfeb6abbf80a31a3b7 Mon Sep 17 00:00:00 2001 From: Tsuzu <8574909+tsuzu@users.noreply.github.com> Date: Thu, 5 Dec 2024 06:33:29 +0900 Subject: [PATCH] Fix godoc manually by simply replacing existing comments --- api/v1beta1/cluster_types.go | 22 ++++++------- api/v1beta1/clusterclass_types.go | 10 +++--- api/v1beta1/common_types.go | 6 ++-- api/v1beta1/condition_types.go | 6 ++-- api/v1beta1/machinedeployment_types.go | 30 ++++++++--------- api/v1beta1/machinehealthcheck_types.go | 10 +++--- api/v1beta1/machineset_types.go | 8 ++--- .../kubeadm/api/v1beta1/kubeadm_types.go | 6 ++-- .../v1beta1/kubeadmconfigtemplate_types.go | 2 +- .../v1beta1/kubeadm_control_plane_types.go | 26 +++++++-------- .../kubeadmcontrolplanetemplate_types.go | 10 +++--- .../api/v1beta1/clusterresourceset_types.go | 2 +- exp/api/v1beta1/machinepool_types.go | 10 +++--- .../api/v1alpha1/extensionconfig_types.go | 4 +-- .../hooks/api/v1alpha1/common_types.go | 2 +- .../api/v1alpha1/topologymutation_types.go | 2 +- .../kubeadm/v1alpha4/kubeadm_types.go | 2 +- .../v1alpha3/kubeadm_control_plane_types.go | 18 +++++------ .../v1alpha4/kubeadm_control_plane_types.go | 20 ++++++------ .../v1alpha3/clusterresourceset_types.go | 2 +- .../v1alpha4/clusterresourceset_types.go | 2 +- .../core/exp/v1alpha3/machinepool_types.go | 12 +++---- .../core/exp/v1alpha4/machinepool_types.go | 10 +++--- internal/apis/core/v1alpha3/cluster_types.go | 12 +++---- internal/apis/core/v1alpha3/common_types.go | 8 ++--- .../apis/core/v1alpha3/condition_types.go | 6 ++-- .../core/v1alpha3/machinedeployment_types.go | 32 +++++++++---------- .../core/v1alpha3/machinehealthcheck_types.go | 10 +++--- .../apis/core/v1alpha3/machineset_types.go | 8 ++--- internal/apis/core/v1alpha4/cluster_types.go | 16 +++++----- .../apis/core/v1alpha4/clusterclass_types.go | 2 +- internal/apis/core/v1alpha4/common_types.go | 6 ++-- .../apis/core/v1alpha4/condition_types.go | 6 ++-- .../core/v1alpha4/machinedeployment_types.go | 32 +++++++++---------- .../core/v1alpha4/machinehealthcheck_types.go | 10 +++--- .../apis/core/v1alpha4/machineset_types.go | 8 ++--- 36 files changed, 189 insertions(+), 189 deletions(-) diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index bbce8f181311..71930444dfd2 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -465,7 +465,7 @@ type ClusterSpec struct { // +optional Paused bool `json:"paused,omitempty"` - // Cluster network configuration. + // clusterNetwork represents the cluster network configuration. // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` @@ -514,10 +514,10 @@ type ClusterAvailabilityGate struct { // Topology encapsulates the information of the managed resources. type Topology struct { - // The name of the ClusterClass object to create the topology. + // class is the name of the ClusterClass object to create the topology. Class string `json:"class"` - // The Kubernetes version of the cluster. + // version is the Kubernetes version of the cluster. Version string `json:"version"` // rolloutAfter performs a rollout of the entire cluster one component at a time, @@ -657,14 +657,14 @@ type MachineDeploymentTopology struct { // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` - // Minimum number of seconds for which a newly created machine should + // minReadySeconds is the minimum number of seconds for which a newly created machine should // be ready. // Defaults to 0 (machine will be considered available as soon as it // is ready) // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // The deployment strategy to use to replace existing machines with + // strategy is the deployment strategy to use to replace existing machines with // new ones. // +optional Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` @@ -734,7 +734,7 @@ type MachinePoolTopology struct { // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` - // Minimum number of seconds for which a newly created machine pool should + // minReadySeconds is the minimum number of seconds for which a newly created machine pool should // be ready. // Defaults to 0 (machine will be considered available as soon as it // is ready) @@ -815,15 +815,15 @@ type ClusterNetwork struct { // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` - // The network ranges from which service VIPs are allocated. + // services is the network ranges from which service VIPs are allocated. // +optional Services *NetworkRanges `json:"services,omitempty"` - // The network ranges from which Pod networks are allocated. + // pods is the network ranges from which Pod networks are allocated. // +optional Pods *NetworkRanges `json:"pods,omitempty"` - // Domain name for services. + // serviceDomain is the domain name for services. // +optional ServiceDomain string `json:"serviceDomain,omitempty"` } @@ -998,10 +998,10 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase { // APIEndpoint represents a reachable Kubernetes API endpoint. type APIEndpoint struct { - // The hostname on which the API server is serving. + // host is the hostname on which the API server is serving. Host string `json:"host"` - // The port on which the API server is serving. + // port is the port on which the API server is serving. Port int32 `json:"port"` } diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go index 1f7984fd00f1..fbf4c0873067 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/v1beta1/clusterclass_types.go @@ -243,14 +243,14 @@ type MachineDeploymentClass struct { // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` - // Minimum number of seconds for which a newly created machine should + // minReadySeconds is the minimum number of seconds for which a newly created machine should // be ready. // Defaults to 0 (machine will be considered available as soon as it // is ready) // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // The deployment strategy to use to replace existing machines with + // strategy is the deployment strategy to use to replace existing machines with // new ones. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` @@ -377,7 +377,7 @@ type MachinePoolClass struct { // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` - // Minimum number of seconds for which a newly created machine pool should + // minReadySeconds is the minimum number of seconds for which a newly created machine pool should // be ready. // Defaults to 0 (machine will be considered available as soon as it // is ready) @@ -452,7 +452,7 @@ type ClusterClassVariable struct { // // Deprecated: This struct is deprecated and is going to be removed in the next apiVersion. type ClusterClassVariableMetadata struct { - // Map of string keys and values that can be used to organize and categorize + // labels is a map of string keys and values that can be used to organize and categorize // (scope and select) variables. // +optional Labels map[string]string `json:"labels,omitempty"` @@ -673,7 +673,7 @@ type JSONSchemaProps struct { // VariableSchemaMetadata is the metadata of a variable or a nested field within a variable. // It can be used to add additional data for higher level tools. type VariableSchemaMetadata struct { - // Map of string keys and values that can be used to organize and categorize + // labels is a map of string keys and values that can be used to organize and categorize // (scope and select) variables. // +optional Labels map[string]string `json:"labels,omitempty"` diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go index f70b0f3e4a36..6ec4aff36832 100644 --- a/api/v1beta1/common_types.go +++ b/api/v1beta1/common_types.go @@ -273,10 +273,10 @@ const ( // MachineAddress contains information for the node's address. type MachineAddress struct { - // Machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS. + // type is the machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS. Type MachineAddressType `json:"type"` - // The machine address. + // address is the machine address. Address string `json:"address"` } @@ -305,7 +305,7 @@ type MachineAddresses []MachineAddress // In future versions, controller-tools@v2 might allow overriding the type and validation for embedded // types. When that happens, this hack should be revisited. type ObjectMeta struct { - // Map of string keys and values that can be used to organize and categorize + // labels is a map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: http://kubernetes.io/docs/user-guide/labels diff --git a/api/v1beta1/condition_types.go b/api/v1beta1/condition_types.go index e647f89a2d7b..89c0692c6663 100644 --- a/api/v1beta1/condition_types.go +++ b/api/v1beta1/condition_types.go @@ -67,18 +67,18 @@ type Condition struct { // +optional Severity ConditionSeverity `json:"severity,omitempty"` - // Last time the condition transitioned from one status to another. + // lastTransitionTime is the last time the condition transitioned from one status to another. // This should be when the underlying condition changed. If that is not known, then using the time when // the API field changed is acceptable. LastTransitionTime metav1.Time `json:"lastTransitionTime"` - // The reason for the condition's last transition in CamelCase. + // reason is the reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. // This field may be empty. // +optional Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. + // message is a human readable message indicating details about the transition. // This field may be empty. // +optional Message string `json:"message,omitempty"` diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go index 2828550efd6e..67145c6e9d4d 100644 --- a/api/v1beta1/machinedeployment_types.go +++ b/api/v1beta1/machinedeployment_types.go @@ -244,7 +244,7 @@ type MachineDeploymentSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Number of desired machines. + // replicas is the number of desired machines. // This is a pointer to distinguish between explicit zero and not specified. // // Defaults to: @@ -273,7 +273,7 @@ type MachineDeploymentSpec struct { // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` - // Label selector for machines. Existing MachineSets whose machines are + // selector is the label selector for machines. Existing MachineSets whose machines are // selected by this will be the ones affected by this deployment. // It must match the machine template's labels. Selector metav1.LabelSelector `json:"selector"` @@ -281,7 +281,7 @@ type MachineDeploymentSpec struct { // template describes the machines that will be created. Template MachineTemplateSpec `json:"template"` - // The deployment strategy to use to replace existing machines with + // strategy is the deployment strategy to use to replace existing machines with // new ones. // +optional Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` @@ -291,7 +291,7 @@ type MachineDeploymentSpec struct { // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // The number of old MachineSets to retain to allow rollback. + // revisionHistoryLimit is the number of old MachineSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. // Defaults to 1. // @@ -300,11 +300,11 @@ type MachineDeploymentSpec struct { // +optional RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - // Indicates that the deployment is paused. + // paused indicates that the deployment is paused. // +optional Paused bool `json:"paused,omitempty"` - // The maximum time in seconds for a deployment to make progress before it + // progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it // is considered to be failed. The deployment controller will continue to // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will @@ -329,7 +329,7 @@ type MachineDeploymentStrategy struct { // +optional Type MachineDeploymentStrategyType `json:"type,omitempty"` - // Rolling update config params. Present only if + // rollingUpdate is the rolling update config params. Present only if // MachineDeploymentStrategyType = RollingUpdate. // +optional RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` @@ -346,7 +346,7 @@ type MachineDeploymentStrategy struct { // MachineRollingUpdateDeployment is used to control the desired behavior of rolling update. type MachineRollingUpdateDeployment struct { - // The maximum number of machines that can be unavailable during the update. + // maxUnavailable is the maximum number of machines that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of desired // machines (ex: 10%). // Absolute number is calculated from percentage by rounding down. @@ -361,7 +361,7 @@ type MachineRollingUpdateDeployment struct { // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - // The maximum number of machines that can be scheduled above the + // maxSurge is the maximum number of machines that can be scheduled above the // desired number of machines. // Value can be an absolute number (ex: 5) or a percentage of // desired machines (ex: 10%). @@ -416,7 +416,7 @@ type RemediationStrategy struct { // MachineDeploymentStatus defines the observed state of MachineDeployment. type MachineDeploymentStatus struct { - // The generation observed by the deployment controller. + // observedGeneration is the generation observed by the deployment controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -426,26 +426,26 @@ type MachineDeploymentStatus struct { // +optional Selector string `json:"selector,omitempty"` - // Total number of non-terminated machines targeted by this deployment + // replicas is the total number of non-terminated machines targeted by this deployment // (their labels match the selector). // +optional Replicas int32 `json:"replicas"` - // Total number of non-terminated machines targeted by this deployment + // updatedReplicas is the total number of non-terminated machines targeted by this deployment // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas"` - // Total number of ready machines targeted by this deployment. + // readyReplicas is the total number of ready machines targeted by this deployment. // +optional ReadyReplicas int32 `json:"readyReplicas"` - // Total number of available machines (ready for at least minReadySeconds) + // availableReplicas is the total number of available machines (ready for at least minReadySeconds) // targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas"` - // Total number of unavailable machines targeted by this deployment. + // unavailableReplicas is the total number of unavailable machines targeted by this deployment. // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet available or machines diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/v1beta1/machinehealthcheck_types.go index 42c4817f0f15..6dfb5e11e146 100644 --- a/api/v1beta1/machinehealthcheck_types.go +++ b/api/v1beta1/machinehealthcheck_types.go @@ -55,7 +55,7 @@ type MachineHealthCheckSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Label selector to match machines whose health will be exercised + // selector is a label selector to match machines whose health will be exercised Selector metav1.LabelSelector `json:"selector"` // unhealthyConditions contains a list of the conditions that determine @@ -135,12 +135,12 @@ type UnhealthyCondition struct { // MachineHealthCheckStatus defines the observed state of MachineHealthCheck. type MachineHealthCheckStatus struct { - // total number of machines counted by this machine health check + // expectedMachines is the total number of machines counted by this machine health check // +kubebuilder:validation:Minimum=0 // +optional ExpectedMachines int32 `json:"expectedMachines"` - // total number of healthy machines counted by this machine health check + // currentHealthy is the total number of healthy machines counted by this machine health check // +kubebuilder:validation:Minimum=0 // +optional CurrentHealthy int32 `json:"currentHealthy"` @@ -197,10 +197,10 @@ type MachineHealthCheck struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of machine health check policy + // spec is the specification of machine health check policy Spec MachineHealthCheckSpec `json:"spec,omitempty"` - // Most recently observed status of MachineHealthCheck resource + // status is the most recently observed status of MachineHealthCheck resource Status MachineHealthCheckStatus `json:"status,omitempty"` } diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go index 1abbd906cd45..75f38a33fb42 100644 --- a/api/v1beta1/machineset_types.go +++ b/api/v1beta1/machineset_types.go @@ -236,7 +236,7 @@ type MachineTemplateSpec struct { // +optional ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the machine. + // spec is the specification of the desired behavior of the machine. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec MachineSpec `json:"spec,omitempty"` @@ -285,18 +285,18 @@ type MachineSetStatus struct { // +optional Replicas int32 `json:"replicas"` - // The number of replicas that have labels matching the labels of the machine template of the MachineSet. + // fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet. // // 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. // // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas"` - // The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". + // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". // +optional ReadyReplicas int32 `json:"readyReplicas"` - // The number of available replicas (ready for at least minReadySeconds) for this MachineSet. + // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet. // +optional AvailableReplicas int32 `json:"availableReplicas"` diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go index 7c9ac3753301..0712fabcc4a0 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -142,7 +142,7 @@ type ClusterConfiguration struct { // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` - // The cluster name + // clusterName is the cluster name // +optional ClusterName string `json:"clusterName,omitempty"` } @@ -634,7 +634,7 @@ type KubeConfigAuthExec struct { // command to execute. Command string `json:"command"` - // Arguments to pass to the command when executing it. + // args is the arguments to pass to the command when executing it. // +optional Args []string `json:"args,omitempty"` @@ -644,7 +644,7 @@ type KubeConfigAuthExec struct { // +optional Env []KubeConfigAuthExecEnv `json:"env,omitempty"` - // Preferred input version of the ExecInfo. The returned ExecCredentials MUST use + // apiVersion is preferred input version of the ExecInfo. The returned ExecCredentials MUST use // the same encoding version as the input. // Defaults to client.authentication.k8s.io/v1 if not set. // +optional diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go index 4326cb4599c1..2758c50fd8eb 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go @@ -29,7 +29,7 @@ type KubeadmConfigTemplateSpec struct { // KubeadmConfigTemplateResource defines the Template structure. type KubeadmConfigTemplateResource struct { - // Standard object's metadata. + // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go index ae85a68d616e..28d42e3a1f98 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -78,7 +78,7 @@ const ( // KubeadmControlPlaneSpec defines the desired state of KubeadmControlPlane. type KubeadmControlPlaneSpec struct { - // Number of desired machines. Defaults to 1. When stacked etcd is used only + // replicas is the number of desired machines. Defaults to 1. When stacked etcd is used only // odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). // This is a pointer to distinguish between explicit zero and not specified. // +optional @@ -114,17 +114,17 @@ type KubeadmControlPlaneSpec struct { // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` - // The RolloutStrategy to use to replace control plane machines with + // rolloutStrategy is the RolloutStrategy to use to replace control plane machines with // new ones. // +optional // +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1}} RolloutStrategy *RolloutStrategy `json:"rolloutStrategy,omitempty"` - // The RemediationStrategy that controls how control plane machine remediation happens. + // remediationStrategy is the RemediationStrategy that controls how control plane machine remediation happens. // +optional RemediationStrategy *RemediationStrategy `json:"remediationStrategy,omitempty"` - // MachineNamingStrategy allows changing the naming pattern used when creating Machines. + // machineNamingStrategy allows changing the naming pattern used when creating Machines. // InfraMachines & KubeadmConfigs will use the same name as the corresponding Machines. // +optional MachineNamingStrategy *MachineNamingStrategy `json:"machineNamingStrategy,omitempty"` @@ -133,7 +133,7 @@ type KubeadmControlPlaneSpec struct { // KubeadmControlPlaneMachineTemplate defines the template for Machines // in a KubeadmControlPlane object. type KubeadmControlPlaneMachineTemplate struct { - // Standard object's metadata. + // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` @@ -177,7 +177,7 @@ type RolloutStrategy struct { // +optional Type RolloutStrategyType `json:"type,omitempty"` - // Rolling update config params. Present only if + // rollingUpdate is the rolling update config params. Present only if // RolloutStrategyType = RollingUpdate. // +optional RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"` @@ -185,7 +185,7 @@ type RolloutStrategy struct { // RollingUpdate is used to control the desired behavior of rolling update. type RollingUpdate struct { - // The maximum number of control planes that can be scheduled above or under the + // maxSurge is the maximum number of control planes that can be scheduled above or under the // desired number of control planes. // Value can be an absolute number 1 or 0. // Defaults to 1. @@ -242,7 +242,7 @@ type RemediationStrategy struct { // MachineNamingStrategy allows changing the naming pattern used when creating Machines. // InfraMachines & KubeadmConfigs will use the same name as the corresponding Machines. type MachineNamingStrategy struct { - // Template defines the template to use for generating the names of the Machine objects. + // template defines the template to use for generating the names of the Machine objects. // If not defined, it will fallback to `{{ .kubeadmControlPlane.name }}-{{ .random }}`. // If the generated name string exceeds 63 characters, it will be trimmed to 58 characters and will // get concatenated with a random suffix of length 5. @@ -266,7 +266,7 @@ type KubeadmControlPlaneStatus struct { // +optional Selector string `json:"selector,omitempty"` - // Total number of non-terminated machines targeted by this control plane + // replicas is the total number of non-terminated machines targeted by this control plane // (their labels match the selector). // +optional Replicas int32 `json:"replicas"` @@ -276,16 +276,16 @@ type KubeadmControlPlaneStatus struct { // +optional Version *string `json:"version,omitempty"` - // Total number of non-terminated machines targeted by this control plane + // updatedReplicas is the total number of non-terminated machines targeted by this control plane // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas"` - // Total number of fully running and ready control plane machines. + // readyReplicas is the total number of fully running and ready control plane machines. // +optional ReadyReplicas int32 `json:"readyReplicas"` - // Total number of unavailable machines targeted by this control plane. + // unavailableReplicas is the total number of unavailable machines targeted by this control plane. // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet ready or machines @@ -321,7 +321,7 @@ type KubeadmControlPlaneStatus struct { // +optional FailureReason errors.KubeadmControlPlaneStatusError `json:"failureReason,omitempty"` - // ErrorMessage indicates that there is a terminal problem reconciling the + // failureMessage indicates that there is a terminal problem reconciling the // state, and will be set to a descriptive error message. // // 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. diff --git a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go index 122acb24c5a8..1caad30ac205 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go @@ -56,7 +56,7 @@ func init() { // KubeadmControlPlaneTemplateResource describes the data needed to create a KubeadmControlPlane from a template. type KubeadmControlPlaneTemplateResource struct { - // Standard object's metadata. + // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` @@ -92,17 +92,17 @@ type KubeadmControlPlaneTemplateResourceSpec struct { // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` - // The RolloutStrategy to use to replace control plane machines with + // rolloutStrategy is the RolloutStrategy to use to replace control plane machines with // new ones. // +optional // +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1}} RolloutStrategy *RolloutStrategy `json:"rolloutStrategy,omitempty"` - // The RemediationStrategy that controls how control plane machine remediation happens. + // remediationStrategy is the RemediationStrategy that controls how control plane machine remediation happens. // +optional RemediationStrategy *RemediationStrategy `json:"remediationStrategy,omitempty"` - // MachineNamingStrategy allows changing the naming pattern used when creating Machines. + // machineNamingStrategy allows changing the naming pattern used when creating Machines. // InfraMachines & KubeadmConfigs will use the same name as the corresponding Machines. // +optional MachineNamingStrategy *MachineNamingStrategy `json:"machineNamingStrategy,omitempty"` @@ -115,7 +115,7 @@ type KubeadmControlPlaneTemplateResourceSpec struct { // because they are calculated by the Cluster topology reconciler during reconciliation and thus cannot // be configured on the KubeadmControlPlaneTemplate. type KubeadmControlPlaneTemplateMachineTemplate struct { - // Standard object's metadata. + // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` diff --git a/exp/addons/api/v1beta1/clusterresourceset_types.go b/exp/addons/api/v1beta1/clusterresourceset_types.go index bc9dae48fcab..1980fdeadf75 100644 --- a/exp/addons/api/v1beta1/clusterresourceset_types.go +++ b/exp/addons/api/v1beta1/clusterresourceset_types.go @@ -55,7 +55,7 @@ const ( // ClusterResourceSetSpec defines the desired state of ClusterResourceSet. type ClusterResourceSetSpec struct { - // Label selector for Clusters. The Clusters that are + // clusterSelector is the label selector for Clusters. The Clusters that are // selected by this will be the ones affected by this ClusterResourceSet. // It must match the Cluster labels. This field is immutable. // Label selector cannot be empty. diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go index cc8e4561bd08..9cae2684dcd9 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/exp/api/v1beta1/machinepool_types.go @@ -37,7 +37,7 @@ type MachinePoolSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Number of desired machines. Defaults to 1. + // replicas is the number of desired machines. Defaults to 1. // This is a pointer to distinguish between explicit zero and not specified. // +optional Replicas *int32 `json:"replicas,omitempty"` @@ -45,7 +45,7 @@ type MachinePoolSpec struct { // template describes the machines that will be created. Template clusterv1.MachineTemplateSpec `json:"template"` - // Minimum number of seconds for which a newly created machine instances should + // minReadySeconds is the minimum number of seconds for which a newly created machine instances should // be ready. // Defaults to 0 (machine instance will be considered available as soon as it // is ready) @@ -76,15 +76,15 @@ type MachinePoolStatus struct { // +optional Replicas int32 `json:"replicas"` - // The number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". + // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // The number of available replicas (ready for at least minReadySeconds) for this MachinePool. + // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // Total number of unavailable machine instances targeted by this machine pool. + // unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. // This is the total number of machine instances that are still required for // the machine pool to have 100% available capacity. They may either // be machine instances that are running but not yet available or machine instances diff --git a/exp/runtime/api/v1alpha1/extensionconfig_types.go b/exp/runtime/api/v1alpha1/extensionconfig_types.go index 34855080b018..2a62ebf363ad 100644 --- a/exp/runtime/api/v1alpha1/extensionconfig_types.go +++ b/exp/runtime/api/v1alpha1/extensionconfig_types.go @@ -170,10 +170,10 @@ type ExtensionConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // ExtensionConfigSpec is the desired state of the ExtensionConfig + // spec is the desired state of the ExtensionConfig Spec ExtensionConfigSpec `json:"spec,omitempty"` - // ExtensionConfigStatus is the current state of the ExtensionConfig + // status is the current state of the ExtensionConfig Status ExtensionConfigStatus `json:"status,omitempty"` } diff --git a/exp/runtime/hooks/api/v1alpha1/common_types.go b/exp/runtime/hooks/api/v1alpha1/common_types.go index f7856a436ad1..793c12c02eb3 100644 --- a/exp/runtime/hooks/api/v1alpha1/common_types.go +++ b/exp/runtime/hooks/api/v1alpha1/common_types.go @@ -73,7 +73,7 @@ type CommonResponse struct { // status of the call. One of "Success" or "Failure". Status ResponseStatus `json:"status"` - // A human-readable description of the status of the call. + // message is a human-readable description of the status of the call. Message string `json:"message"` } diff --git a/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go b/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go index f9f2fbad63c5..17ddbe976a8f 100644 --- a/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go +++ b/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go @@ -158,7 +158,7 @@ type Variable struct { // HolderReference represents a reference to an object which holds a template. type HolderReference struct { - // API version of the referent. + // apiVersion of the referent. APIVersion string `json:"apiVersion"` // kind of the referent. diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go index 0479d76bf4b8..54af645d0916 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go @@ -123,7 +123,7 @@ type ClusterConfiguration struct { // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` - // The cluster name + // clusterName is the cluster name // +optional ClusterName string `json:"clusterName,omitempty"` } diff --git a/internal/apis/controlplane/kubeadm/v1alpha3/kubeadm_control_plane_types.go b/internal/apis/controlplane/kubeadm/v1alpha3/kubeadm_control_plane_types.go index 4e8e27d645d8..e1be47f0996b 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/kubeadm_control_plane_types.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/kubeadm_control_plane_types.go @@ -59,7 +59,7 @@ const ( // KubeadmControlPlaneSpec defines the desired state of KubeadmControlPlane. type KubeadmControlPlaneSpec struct { - // Number of desired machines. Defaults to 1. When stacked etcd is used only + // replicas is the number of desired machines. Defaults to 1. When stacked etcd is used only // odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). // This is a pointer to distinguish between explicit zero and not specified. // +optional @@ -88,7 +88,7 @@ type KubeadmControlPlaneSpec struct { // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // The RolloutStrategy to use to replace control plane machines with + // rolloutStrategy is the RolloutStrategy to use to replace control plane machines with // new ones. // +optional RolloutStrategy *RolloutStrategy `json:"rolloutStrategy,omitempty"` @@ -103,7 +103,7 @@ type RolloutStrategy struct { // +optional Type RolloutStrategyType `json:"type,omitempty"` - // Rolling update config params. Present only if + // rollingUpdate is the rolling update config params. Present only if // RolloutStrategyType = RollingUpdate. // +optional RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"` @@ -111,7 +111,7 @@ type RolloutStrategy struct { // RollingUpdate is used to control the desired behavior of rolling update. type RollingUpdate struct { - // The maximum number of control planes that can be scheduled above or under the + // maxSurge is the maximum number of control planes that can be scheduled above or under the // desired number of control planes. // Value can be an absolute number 1 or 0. // Defaults to 1. @@ -131,21 +131,21 @@ type KubeadmControlPlaneStatus struct { // +optional Selector string `json:"selector,omitempty"` - // Total number of non-terminated machines targeted by this control plane + // replicas is the total number of non-terminated machines targeted by this control plane // (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty"` - // Total number of non-terminated machines targeted by this control plane + // updatedReplicas is the total number of non-terminated machines targeted by this control plane // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` - // Total number of fully running and ready control plane machines. + // readyReplicas is the total number of fully running and ready control plane machines. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // Total number of unavailable machines targeted by this control plane. + // unavailableReplicas is the total number of unavailable machines targeted by this control plane. // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet ready or machines @@ -169,7 +169,7 @@ type KubeadmControlPlaneStatus struct { // +optional FailureReason errors.KubeadmControlPlaneStatusError `json:"failureReason,omitempty"` - // ErrorMessage indicates that there is a terminal problem reconciling the + // failureMessage indicates that there is a terminal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` diff --git a/internal/apis/controlplane/kubeadm/v1alpha4/kubeadm_control_plane_types.go b/internal/apis/controlplane/kubeadm/v1alpha4/kubeadm_control_plane_types.go index 571043a96677..53426c32f6fc 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/kubeadm_control_plane_types.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/kubeadm_control_plane_types.go @@ -53,7 +53,7 @@ const ( // KubeadmControlPlaneSpec defines the desired state of KubeadmControlPlane. type KubeadmControlPlaneSpec struct { - // Number of desired machines. Defaults to 1. When stacked etcd is used only + // replicas is the number of desired machines. Defaults to 1. When stacked etcd is used only // odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). // This is a pointer to distinguish between explicit zero and not specified. // +optional @@ -77,7 +77,7 @@ type KubeadmControlPlaneSpec struct { // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` - // The RolloutStrategy to use to replace control plane machines with + // rolloutStrategy is the RolloutStrategy to use to replace control plane machines with // new ones. // +optional // +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1}} @@ -87,7 +87,7 @@ type KubeadmControlPlaneSpec struct { // KubeadmControlPlaneMachineTemplate defines the template for Machines // in a KubeadmControlPlane object. type KubeadmControlPlaneMachineTemplate struct { - // Standard object's metadata. + // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta clusterv1alpha4.ObjectMeta `json:"metadata,omitempty"` @@ -112,7 +112,7 @@ type RolloutStrategy struct { // +optional Type RolloutStrategyType `json:"type,omitempty"` - // Rolling update config params. Present only if + // rollingUpdate is the rolling update config params. Present only if // RolloutStrategyType = RollingUpdate. // +optional RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"` @@ -120,7 +120,7 @@ type RolloutStrategy struct { // RollingUpdate is used to control the desired behavior of rolling update. type RollingUpdate struct { - // The maximum number of control planes that can be scheduled above or under the + // maxSurge is the maximum number of control planes that can be scheduled above or under the // desired number of control planes. // Value can be an absolute number 1 or 0. // Defaults to 1. @@ -140,7 +140,7 @@ type KubeadmControlPlaneStatus struct { // +optional Selector string `json:"selector,omitempty"` - // Total number of non-terminated machines targeted by this control plane + // replicas is the total number of non-terminated machines targeted by this control plane // (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty"` @@ -150,16 +150,16 @@ type KubeadmControlPlaneStatus struct { // +optional Version *string `json:"version,omitempty"` - // Total number of non-terminated machines targeted by this control plane + // updatedReplicas is the total number of non-terminated machines targeted by this control plane // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` - // Total number of fully running and ready control plane machines. + // readyReplicas is the total number of fully running and ready control plane machines. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // Total number of unavailable machines targeted by this control plane. + // unavailableReplicas is the total number of unavailable machines targeted by this control plane. // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet ready or machines @@ -183,7 +183,7 @@ type KubeadmControlPlaneStatus struct { // +optional FailureReason errors.KubeadmControlPlaneStatusError `json:"failureReason,omitempty"` - // ErrorMessage indicates that there is a terminal problem reconciling the + // failureMessage indicates that there is a terminal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` diff --git a/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go b/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go index d28a33c2beae..cdb82cebaa5c 100644 --- a/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go +++ b/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go @@ -35,7 +35,7 @@ const ( // ClusterResourceSetSpec defines the desired state of ClusterResourceSet. type ClusterResourceSetSpec struct { - // Label selector for Clusters. The Clusters that are + // clusterSelector is the label selector for Clusters. The Clusters that are // selected by this will be the ones affected by this ClusterResourceSet. // It must match the Cluster labels. This field is immutable. ClusterSelector metav1.LabelSelector `json:"clusterSelector"` diff --git a/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go b/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go index 399360fe4387..9980f4ff73fd 100644 --- a/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go +++ b/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go @@ -35,7 +35,7 @@ const ( // ClusterResourceSetSpec defines the desired state of ClusterResourceSet. type ClusterResourceSetSpec struct { - // Label selector for Clusters. The Clusters that are + // clusterSelector is the label selector for Clusters. The Clusters that are // selected by this will be the ones affected by this ClusterResourceSet. // It must match the Cluster labels. This field is immutable. // Label selector cannot be empty. diff --git a/internal/apis/core/exp/v1alpha3/machinepool_types.go b/internal/apis/core/exp/v1alpha3/machinepool_types.go index c68511e539c4..2b322d42404d 100644 --- a/internal/apis/core/exp/v1alpha3/machinepool_types.go +++ b/internal/apis/core/exp/v1alpha3/machinepool_types.go @@ -37,19 +37,19 @@ type MachinePoolSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Number of desired machines. Defaults to 1. + // replicas is the number of desired machines. Defaults to 1. // This is a pointer to distinguish between explicit zero and not specified. Replicas *int32 `json:"replicas,omitempty"` // template describes the machines that will be created. Template clusterv1alpha3.MachineTemplateSpec `json:"template"` - // The deployment strategy to use to replace existing machine instances with + // strategy is the deployment strategy to use to replace existing machine instances with // new ones. // +optional Strategy *clusterv1alpha3.MachineDeploymentStrategy `json:"strategy,omitempty"` - // Minimum number of seconds for which a newly created machine instances should + // minReadySeconds is the minimum number of seconds for which a newly created machine instances should // be ready. // Defaults to 0 (machine instance will be considered available as soon as it // is ready) @@ -79,15 +79,15 @@ type MachinePoolStatus struct { // +optional Replicas int32 `json:"replicas"` - // The number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". + // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // The number of available replicas (ready for at least minReadySeconds) for this MachinePool. + // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // Total number of unavailable machine instances targeted by this machine pool. + // unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. // This is the total number of machine instances that are still required for // the machine pool to have 100% available capacity. They may either // be machine instances that are running but not yet available or machine instances diff --git a/internal/apis/core/exp/v1alpha4/machinepool_types.go b/internal/apis/core/exp/v1alpha4/machinepool_types.go index a9fe8cbbb124..9afdd102d6f6 100644 --- a/internal/apis/core/exp/v1alpha4/machinepool_types.go +++ b/internal/apis/core/exp/v1alpha4/machinepool_types.go @@ -37,14 +37,14 @@ type MachinePoolSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Number of desired machines. Defaults to 1. + // replicas is the number of desired machines. Defaults to 1. // This is a pointer to distinguish between explicit zero and not specified. Replicas *int32 `json:"replicas,omitempty"` // template describes the machines that will be created. Template clusterv1alpha4.MachineTemplateSpec `json:"template"` - // Minimum number of seconds for which a newly created machine instances should + // minReadySeconds is the minimum number of seconds for which a newly created machine instances should // be ready. // Defaults to 0 (machine instance will be considered available as soon as it // is ready) @@ -74,15 +74,15 @@ type MachinePoolStatus struct { // +optional Replicas int32 `json:"replicas"` - // The number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". + // readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // The number of available replicas (ready for at least minReadySeconds) for this MachinePool. + // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // Total number of unavailable machine instances targeted by this machine pool. + // unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. // This is the total number of machine instances that are still required for // the machine pool to have 100% available capacity. They may either // be machine instances that are running but not yet available or machine instances diff --git a/internal/apis/core/v1alpha3/cluster_types.go b/internal/apis/core/v1alpha3/cluster_types.go index 8fd90e134c9f..e037668019b5 100644 --- a/internal/apis/core/v1alpha3/cluster_types.go +++ b/internal/apis/core/v1alpha3/cluster_types.go @@ -42,7 +42,7 @@ type ClusterSpec struct { // +optional Paused bool `json:"paused,omitempty"` - // Cluster network configuration. + // clusterNetwork is the cluster network configuration. // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` @@ -73,15 +73,15 @@ type ClusterNetwork struct { // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` - // The network ranges from which service VIPs are allocated. + // services is the network ranges from which service VIPs are allocated. // +optional Services *NetworkRanges `json:"services,omitempty"` - // The network ranges from which Pod networks are allocated. + // pods is the network ranges from which Pod networks are allocated. // +optional Pods *NetworkRanges `json:"pods,omitempty"` - // Domain name for services. + // serviceDomain is the domain name for services. // +optional ServiceDomain string `json:"serviceDomain,omitempty"` } @@ -175,10 +175,10 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase { // APIEndpoint represents a reachable Kubernetes API endpoint. type APIEndpoint struct { - // The hostname on which the API server is serving. + // host is the hostname on which the API server is serving. Host string `json:"host"` - // The port on which the API server is serving. + // port is the port on which the API server is serving. Port int32 `json:"port"` } diff --git a/internal/apis/core/v1alpha3/common_types.go b/internal/apis/core/v1alpha3/common_types.go index 3ee944bb52e7..a4f921cdf24e 100644 --- a/internal/apis/core/v1alpha3/common_types.go +++ b/internal/apis/core/v1alpha3/common_types.go @@ -91,10 +91,10 @@ const ( // MachineAddress contains information for the node's address. type MachineAddress struct { - // Machine address type, one of Hostname, ExternalIP or InternalIP. + // type is the machine address type, one of Hostname, ExternalIP or InternalIP. Type MachineAddressType `json:"type"` - // The machine address. + // address is the machine address. Address string `json:"address"` } @@ -167,7 +167,7 @@ type ObjectMeta struct { // Deprecated: This field has no function and is going to be removed in a next release. Namespace string `json:"namespace,omitempty"` - // Map of string keys and values that can be used to organize and categorize + // labels is a map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: http://kubernetes.io/docs/user-guide/labels @@ -181,7 +181,7 @@ type ObjectMeta struct { // +optional Annotations map[string]string `json:"annotations,omitempty"` - // List of objects depended by this object. If ALL objects in the list have + // ownerReferences is the list of objects depended by this object. If ALL objects in the list have // been deleted, this object will be garbage collected. If this object is managed by a controller, // then an entry in this list will point to this controller, with the controller field set to true. // There cannot be more than one managing controller. diff --git a/internal/apis/core/v1alpha3/condition_types.go b/internal/apis/core/v1alpha3/condition_types.go index b993200f1e47..228768c2a525 100644 --- a/internal/apis/core/v1alpha3/condition_types.go +++ b/internal/apis/core/v1alpha3/condition_types.go @@ -69,19 +69,19 @@ type Condition struct { // +optional Severity ConditionSeverity `json:"severity,omitempty"` - // Last time the condition transitioned from one status to another. + // lastTransitionTime is the last time the condition transitioned from one status to another. // This should be when the underlying condition changed. If that is not known, then using the time when // the API field changed is acceptable. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition in CamelCase. + // reason is the reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. // This field may not be empty. // +optional Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. + // message is a human readable message indicating details about the transition. // This field may be empty. // +optional Message string `json:"message,omitempty"` diff --git a/internal/apis/core/v1alpha3/machinedeployment_types.go b/internal/apis/core/v1alpha3/machinedeployment_types.go index 7efaf05baa1e..4bac9d73b6c5 100644 --- a/internal/apis/core/v1alpha3/machinedeployment_types.go +++ b/internal/apis/core/v1alpha3/machinedeployment_types.go @@ -51,11 +51,11 @@ type MachineDeploymentSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Number of desired machines. Defaults to 1. + // replicas is the number of desired machines. Defaults to 1. // This is a pointer to distinguish between explicit zero and not specified. Replicas *int32 `json:"replicas,omitempty"` - // Label selector for machines. Existing MachineSets whose machines are + // selector is the label selector for machines. Existing MachineSets whose machines are // selected by this will be the ones affected by this deployment. // It must match the machine template's labels. Selector metav1.LabelSelector `json:"selector"` @@ -63,29 +63,29 @@ type MachineDeploymentSpec struct { // template describes the machines that will be created. Template MachineTemplateSpec `json:"template"` - // The deployment strategy to use to replace existing machines with + // strategy is the deployment strategy to use to replace existing machines with // new ones. // +optional Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` - // Minimum number of seconds for which a newly created machine should + // minReadySeconds is the minimum number of seconds for which a newly created machine should // be ready. // Defaults to 0 (machine will be considered available as soon as it // is ready) // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // The number of old MachineSets to retain to allow rollback. + // revisionHistoryLimit is the number of old MachineSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. // Defaults to 1. // +optional RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - // Indicates that the deployment is paused. + // paused indicates that the deployment is paused. // +optional Paused bool `json:"paused,omitempty"` - // The maximum time in seconds for a deployment to make progress before it + // progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it // is considered to be failed. The deployment controller will continue to // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will @@ -106,7 +106,7 @@ type MachineDeploymentStrategy struct { // +optional Type MachineDeploymentStrategyType `json:"type,omitempty"` - // Rolling update config params. Present only if + // rollingUpdate is the rolling update config params. Present only if // MachineDeploymentStrategyType = RollingUpdate. // +optional RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` @@ -118,7 +118,7 @@ type MachineDeploymentStrategy struct { // MachineRollingUpdateDeployment is used to control the desired behavior of rolling update. type MachineRollingUpdateDeployment struct { - // The maximum number of machines that can be unavailable during the update. + // maxUnavailable is the maximum number of machines that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of desired // machines (ex: 10%). // Absolute number is calculated from percentage by rounding down. @@ -133,7 +133,7 @@ type MachineRollingUpdateDeployment struct { // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - // The maximum number of machines that can be scheduled above the + // maxSurge is the maximum number of machines that can be scheduled above the // desired number of machines. // Value can be an absolute number (ex: 5) or a percentage of // desired machines (ex: 10%). @@ -156,7 +156,7 @@ type MachineRollingUpdateDeployment struct { // MachineDeploymentStatus defines the observed state of MachineDeployment. type MachineDeploymentStatus struct { - // The generation observed by the deployment controller. + // observedGeneration is the generation observed by the deployment controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -166,26 +166,26 @@ type MachineDeploymentStatus struct { // +optional Selector string `json:"selector,omitempty"` - // Total number of non-terminated machines targeted by this deployment + // replicas is the total number of non-terminated machines targeted by this deployment // (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty"` - // Total number of non-terminated machines targeted by this deployment + // updatedReplicas is the total number of non-terminated machines targeted by this deployment // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` - // Total number of ready machines targeted by this deployment. + // readyReplicas is the total number of ready machines targeted by this deployment. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // Total number of available machines (ready for at least minReadySeconds) + // availableReplicas is the total number of available machines (ready for at least minReadySeconds) // targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // Total number of unavailable machines targeted by this deployment. + // unavailableReplicas is the total number of unavailable machines targeted by this deployment. // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet available or machines diff --git a/internal/apis/core/v1alpha3/machinehealthcheck_types.go b/internal/apis/core/v1alpha3/machinehealthcheck_types.go index fb94304e8319..23e2584f3e76 100644 --- a/internal/apis/core/v1alpha3/machinehealthcheck_types.go +++ b/internal/apis/core/v1alpha3/machinehealthcheck_types.go @@ -30,7 +30,7 @@ type MachineHealthCheckSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Label selector to match machines whose health will be exercised + // selector is the label selector to match machines whose health will be exercised Selector metav1.LabelSelector `json:"selector"` // unhealthyConditions contains a list of the conditions that determine @@ -85,11 +85,11 @@ type UnhealthyCondition struct { // MachineHealthCheckStatus defines the observed state of MachineHealthCheck. type MachineHealthCheckStatus struct { - // total number of machines counted by this machine health check + // expectedMachines is the total number of machines counted by this machine health check // +kubebuilder:validation:Minimum=0 ExpectedMachines int32 `json:"expectedMachines,omitempty"` - // total number of healthy machines counted by this machine health check + // currentHealthy is the total number of healthy machines counted by this machine health check // +kubebuilder:validation:Minimum=0 CurrentHealthy int32 `json:"currentHealthy,omitempty"` @@ -129,10 +129,10 @@ type MachineHealthCheck struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of machine health check policy + // spec is the specification of machine health check policy Spec MachineHealthCheckSpec `json:"spec,omitempty"` - // Most recently observed status of MachineHealthCheck resource + // status is the most recently observed status of MachineHealthCheck resource Status MachineHealthCheckStatus `json:"status,omitempty"` } diff --git a/internal/apis/core/v1alpha3/machineset_types.go b/internal/apis/core/v1alpha3/machineset_types.go index 431f400969bc..c391058d7d53 100644 --- a/internal/apis/core/v1alpha3/machineset_types.go +++ b/internal/apis/core/v1alpha3/machineset_types.go @@ -73,7 +73,7 @@ type MachineTemplateSpec struct { // +optional ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the machine. + // spec is the specification of the desired behavior of the machine. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec MachineSpec `json:"spec,omitempty"` @@ -119,15 +119,15 @@ type MachineSetStatus struct { // +optional Replicas int32 `json:"replicas,omitempty"` - // The number of replicas that have labels matching the labels of the machine template of the MachineSet. + // fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet. // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"` - // The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". + // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // The number of available replicas (ready for at least minReadySeconds) for this MachineSet. + // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` diff --git a/internal/apis/core/v1alpha4/cluster_types.go b/internal/apis/core/v1alpha4/cluster_types.go index 65fdc019afb7..2ac1e9383b58 100644 --- a/internal/apis/core/v1alpha4/cluster_types.go +++ b/internal/apis/core/v1alpha4/cluster_types.go @@ -43,7 +43,7 @@ type ClusterSpec struct { // +optional Paused bool `json:"paused,omitempty"` - // Cluster network configuration. + // clusterNetwork is the cluster network configuration. // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` @@ -71,10 +71,10 @@ type ClusterSpec struct { // Topology encapsulates the information of the managed resources. type Topology struct { - // The name of the ClusterClass object to create the topology. + // class is the name of the ClusterClass object to create the topology. Class string `json:"class"` - // The Kubernetes version of the cluster. + // version is the Kubernetes version of the cluster. Version string `json:"version"` // rolloutAfter performs a rollout of the entire cluster one component at a time, @@ -153,15 +153,15 @@ type ClusterNetwork struct { // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` - // The network ranges from which service VIPs are allocated. + // services is the network ranges from which service VIPs are allocated. // +optional Services *NetworkRanges `json:"services,omitempty"` - // The network ranges from which Pod networks are allocated. + // pods is the network ranges from which Pod networks are allocated. // +optional Pods *NetworkRanges `json:"pods,omitempty"` - // Domain name for services. + // serviceDomain is the domain name for services. // +optional ServiceDomain string `json:"serviceDomain,omitempty"` } @@ -251,10 +251,10 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase { // APIEndpoint represents a reachable Kubernetes API endpoint. type APIEndpoint struct { - // The hostname on which the API server is serving. + // host is the hostname on which the API server is serving. Host string `json:"host"` - // The port on which the API server is serving. + // port is the port on which the API server is serving. Port int32 `json:"port"` } diff --git a/internal/apis/core/v1alpha4/clusterclass_types.go b/internal/apis/core/v1alpha4/clusterclass_types.go index ad70f9d33455..0ab9c0e349ed 100644 --- a/internal/apis/core/v1alpha4/clusterclass_types.go +++ b/internal/apis/core/v1alpha4/clusterclass_types.go @@ -69,7 +69,7 @@ type ControlPlaneClass struct { // LocalObjectTemplate contains the reference to the control plane provider. LocalObjectTemplate `json:",inline"` - // MachineTemplate defines the metadata and infrastructure information + // machineInfrastructure defines the metadata and infrastructure information // for control plane machines. // // This field is supported if and only if the control plane provider template diff --git a/internal/apis/core/v1alpha4/common_types.go b/internal/apis/core/v1alpha4/common_types.go index bc17ac1ecfe6..e623c118cd59 100644 --- a/internal/apis/core/v1alpha4/common_types.go +++ b/internal/apis/core/v1alpha4/common_types.go @@ -143,10 +143,10 @@ const ( // MachineAddress contains information for the node's address. type MachineAddress struct { - // Machine address type, one of Hostname, ExternalIP or InternalIP. + // type is the machine address type, one of Hostname, ExternalIP or InternalIP. Type MachineAddressType `json:"type"` - // The machine address. + // address is the machine address. Address string `json:"address"` } @@ -175,7 +175,7 @@ type MachineAddresses []MachineAddress // In future versions, controller-tools@v2 might allow overriding the type and validation for embedded // types. When that happens, this hack should be revisited. type ObjectMeta struct { - // Map of string keys and values that can be used to organize and categorize + // labels is a map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: http://kubernetes.io/docs/user-guide/labels diff --git a/internal/apis/core/v1alpha4/condition_types.go b/internal/apis/core/v1alpha4/condition_types.go index 910bb42ba859..b93b9a752e17 100644 --- a/internal/apis/core/v1alpha4/condition_types.go +++ b/internal/apis/core/v1alpha4/condition_types.go @@ -69,19 +69,19 @@ type Condition struct { // +optional Severity ConditionSeverity `json:"severity,omitempty"` - // Last time the condition transitioned from one status to another. + // lastTransitionTime is the last time the condition transitioned from one status to another. // This should be when the underlying condition changed. If that is not known, then using the time when // the API field changed is acceptable. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition in CamelCase. + // reason is the reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. // This field may not be empty. // +optional Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. + // message is a human readable message indicating details about the transition. // This field may be empty. // +optional Message string `json:"message,omitempty"` diff --git a/internal/apis/core/v1alpha4/machinedeployment_types.go b/internal/apis/core/v1alpha4/machinedeployment_types.go index 38da6c2d9881..99422ee3f17e 100644 --- a/internal/apis/core/v1alpha4/machinedeployment_types.go +++ b/internal/apis/core/v1alpha4/machinedeployment_types.go @@ -67,13 +67,13 @@ type MachineDeploymentSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Number of desired machines. Defaults to 1. + // replicas is the number of desired machines. Defaults to 1. // This is a pointer to distinguish between explicit zero and not specified. // +optional // +kubebuilder:default=1 Replicas *int32 `json:"replicas,omitempty"` - // Label selector for machines. Existing MachineSets whose machines are + // selector is the label selector for machines. Existing MachineSets whose machines are // selected by this will be the ones affected by this deployment. // It must match the machine template's labels. Selector metav1.LabelSelector `json:"selector"` @@ -81,29 +81,29 @@ type MachineDeploymentSpec struct { // template describes the machines that will be created. Template MachineTemplateSpec `json:"template"` - // The deployment strategy to use to replace existing machines with + // strategy is the deployment strategy to use to replace existing machines with // new ones. // +optional Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` - // Minimum number of seconds for which a newly created machine should + // minReadySeconds is the minimum number of seconds for which a newly created machine should // be ready. // Defaults to 0 (machine will be considered available as soon as it // is ready) // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // The number of old MachineSets to retain to allow rollback. + // revisionHistoryLimit is the number of old MachineSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. // Defaults to 1. // +optional RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` - // Indicates that the deployment is paused. + // paused indicates that the deployment is paused. // +optional Paused bool `json:"paused,omitempty"` - // The maximum time in seconds for a deployment to make progress before it + // progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it // is considered to be failed. The deployment controller will continue to // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will @@ -124,7 +124,7 @@ type MachineDeploymentStrategy struct { // +optional Type MachineDeploymentStrategyType `json:"type,omitempty"` - // Rolling update config params. Present only if + // rollingUpdate is the rolling update config params. Present only if // MachineDeploymentStrategyType = RollingUpdate. // +optional RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` @@ -136,7 +136,7 @@ type MachineDeploymentStrategy struct { // MachineRollingUpdateDeployment is used to control the desired behavior of rolling update. type MachineRollingUpdateDeployment struct { - // The maximum number of machines that can be unavailable during the update. + // maxUnavailable is the maximum number of machines that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of desired // machines (ex: 10%). // Absolute number is calculated from percentage by rounding down. @@ -151,7 +151,7 @@ type MachineRollingUpdateDeployment struct { // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - // The maximum number of machines that can be scheduled above the + // maxSurge is the maximum number of machines that can be scheduled above the // desired number of machines. // Value can be an absolute number (ex: 5) or a percentage of // desired machines (ex: 10%). @@ -181,7 +181,7 @@ type MachineRollingUpdateDeployment struct { // MachineDeploymentStatus defines the observed state of MachineDeployment. type MachineDeploymentStatus struct { - // The generation observed by the deployment controller. + // observedGeneration is the generation observed by the deployment controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -191,26 +191,26 @@ type MachineDeploymentStatus struct { // +optional Selector string `json:"selector,omitempty"` - // Total number of non-terminated machines targeted by this deployment + // replicas is the total number of non-terminated machines targeted by this deployment // (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty"` - // Total number of non-terminated machines targeted by this deployment + // updatedReplicas is the total number of non-terminated machines targeted by this deployment // that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` - // Total number of ready machines targeted by this deployment. + // readyReplicas is the total number of ready machines targeted by this deployment. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // Total number of available machines (ready for at least minReadySeconds) + // availableReplicas is the total number of available machines (ready for at least minReadySeconds) // targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // Total number of unavailable machines targeted by this deployment. + // unavailableReplicas is the total number of unavailable machines targeted by this deployment. // This is the total number of machines that are still required for // the deployment to have 100% available capacity. They may either // be machines that are running but not yet available or machines diff --git a/internal/apis/core/v1alpha4/machinehealthcheck_types.go b/internal/apis/core/v1alpha4/machinehealthcheck_types.go index 8695b2ceeeff..2ba78748aef6 100644 --- a/internal/apis/core/v1alpha4/machinehealthcheck_types.go +++ b/internal/apis/core/v1alpha4/machinehealthcheck_types.go @@ -30,7 +30,7 @@ type MachineHealthCheckSpec struct { // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Label selector to match machines whose health will be exercised + // selector is the label selector to match machines whose health will be exercised Selector metav1.LabelSelector `json:"selector"` // unhealthyConditions contains a list of the conditions that determine @@ -96,11 +96,11 @@ type UnhealthyCondition struct { // MachineHealthCheckStatus defines the observed state of MachineHealthCheck. type MachineHealthCheckStatus struct { - // total number of machines counted by this machine health check + // expectedMachines is the total number of machines counted by this machine health check // +kubebuilder:validation:Minimum=0 ExpectedMachines int32 `json:"expectedMachines,omitempty"` - // total number of healthy machines counted by this machine health check + // currentHealthy is the total number of healthy machines counted by this machine health check // +kubebuilder:validation:Minimum=0 CurrentHealthy int32 `json:"currentHealthy,omitempty"` @@ -142,10 +142,10 @@ type MachineHealthCheck struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of machine health check policy + // spec is the specification of machine health check policy Spec MachineHealthCheckSpec `json:"spec,omitempty"` - // Most recently observed status of MachineHealthCheck resource + // status is the most recently observed status of MachineHealthCheck resource Status MachineHealthCheckStatus `json:"status,omitempty"` } diff --git a/internal/apis/core/v1alpha4/machineset_types.go b/internal/apis/core/v1alpha4/machineset_types.go index 70a81a041f09..0e67441714ba 100644 --- a/internal/apis/core/v1alpha4/machineset_types.go +++ b/internal/apis/core/v1alpha4/machineset_types.go @@ -80,7 +80,7 @@ type MachineTemplateSpec struct { // +optional ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the machine. + // spec is the specification of the desired behavior of the machine. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec MachineSpec `json:"spec,omitempty"` @@ -126,15 +126,15 @@ type MachineSetStatus struct { // +optional Replicas int32 `json:"replicas,omitempty"` - // The number of replicas that have labels matching the labels of the machine template of the MachineSet. + // fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet. // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"` - // The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". + // readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // The number of available replicas (ready for at least minReadySeconds) for this MachineSet. + // availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"`