diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index d51fecb2924d..d696ce54e182 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -44,7 +44,7 @@ const ( // ClusterSpec defines the desired state of Cluster. type ClusterSpec struct { - // Paused can be used to prevent controllers from processing the Cluster and all its associated objects. + // paused can be used to prevent controllers from processing the Cluster and all its associated objects. // +optional Paused bool `json:"paused,omitempty"` @@ -52,16 +52,16 @@ type ClusterSpec struct { // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // controlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint,omitempty"` - // ControlPlaneRef is an optional reference to a provider-specific resource that holds + // controlPlaneRef is an optional reference to a provider-specific resource that holds // the details for provisioning the Control Plane for a Cluster. // +optional ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` - // InfrastructureRef is a reference to a provider-specific resource that holds the details + // infrastructureRef is a reference to a provider-specific resource that holds the details // for provisioning infrastructure for a cluster in said provider. // +optional InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` @@ -103,7 +103,7 @@ type Topology struct { // The Kubernetes version of the cluster. Version string `json:"version"` - // RolloutAfter performs a rollout of the entire cluster one component at a time, + // rolloutAfter performs a rollout of the entire cluster one component at a time, // control plane first and then machine deployments. // // Deprecated: This field has no function and is going to be removed in the next apiVersion. @@ -111,16 +111,16 @@ type Topology struct { // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` - // ControlPlane describes the cluster control plane. + // controlPlane describes the cluster control plane. // +optional ControlPlane ControlPlaneTopology `json:"controlPlane,omitempty"` - // Workers encapsulates the different constructs that form the worker nodes + // workers encapsulates the different constructs that form the worker nodes // for the cluster. // +optional Workers *WorkersTopology `json:"workers,omitempty"` - // Variables can be used to customize the Cluster through + // variables can be used to customize the Cluster through // patches. They must comply to the corresponding // VariableClasses defined in the ClusterClass. // +optional @@ -131,56 +131,56 @@ type Topology struct { // ControlPlaneTopology specifies the parameters for the control plane nodes in the cluster. type ControlPlaneTopology struct { - // Metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane + // metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane // if the ControlPlaneTemplate referenced by the ClusterClass is machine based. If not, it // is applied only to the ControlPlane. // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. // +optional Metadata ObjectMeta `json:"metadata,omitempty"` - // Replicas is the number of control plane nodes. + // replicas is the number of control plane nodes. // If the value is nil, the ControlPlane object is created without the number of Replicas // and it's assumed that the control plane controller does not implement support for this field. // When specified against a control plane provider that lacks support for this field, this value will be ignored. // +optional Replicas *int32 `json:"replicas,omitempty"` - // MachineHealthCheck allows to enable, disable and override + // machineHealthCheck allows to enable, disable and override // the MachineHealthCheck configuration in the ClusterClass for this control plane. // +optional MachineHealthCheck *MachineHealthCheckTopology `json:"machineHealthCheck,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // +optional NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"` - // Variables can be used to customize the ControlPlane through patches. + // variables can be used to customize the ControlPlane through patches. // +optional Variables *ControlPlaneVariables `json:"variables,omitempty"` } // WorkersTopology represents the different sets of worker nodes in the cluster. type WorkersTopology struct { - // MachineDeployments is a list of machine deployments in the cluster. + // machineDeployments is a list of machine deployments in the cluster. // +optional // +listType=map // +listMapKey=name MachineDeployments []MachineDeploymentTopology `json:"machineDeployments,omitempty"` - // MachinePools is a list of machine pools in the cluster. + // machinePools is a list of machine pools in the cluster. // +optional // +listType=map // +listMapKey=name @@ -190,51 +190,51 @@ type WorkersTopology struct { // MachineDeploymentTopology specifies the different parameters for a set of worker nodes in the topology. // This set of nodes is managed by a MachineDeployment object whose lifecycle is managed by the Cluster controller. type MachineDeploymentTopology struct { - // Metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. + // metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. // +optional Metadata ObjectMeta `json:"metadata,omitempty"` - // Class is the name of the MachineDeploymentClass used to create the set of worker nodes. + // class is the name of the MachineDeploymentClass used to create the set of worker nodes. // This should match one of the deployment classes defined in the ClusterClass object // mentioned in the `Cluster.Spec.Class` field. Class string `json:"class"` - // Name is the unique identifier for this MachineDeploymentTopology. + // name is the unique identifier for this MachineDeploymentTopology. // The value is used with other unique identifiers to create a MachineDeployment's Name // (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, // the values are hashed together. Name string `json:"name"` - // FailureDomain is the failure domain the machines will be created in. + // failureDomain is the failure domain the machines will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // +optional FailureDomain *string `json:"failureDomain,omitempty"` - // Replicas is the number of worker nodes belonging to this set. + // replicas is the number of worker nodes belonging to this set. // If the value is nil, the MachineDeployment is created without the number of Replicas (defaulting to 1) // and it's assumed that an external entity (like cluster autoscaler) is responsible for the management // of this value. // +optional Replicas *int32 `json:"replicas,omitempty"` - // MachineHealthCheck allows to enable, disable and override + // machineHealthCheck allows to enable, disable and override // the MachineHealthCheck configuration in the ClusterClass for this MachineDeployment. // +optional MachineHealthCheck *MachineHealthCheckTopology `json:"machineHealthCheck,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // +optional @@ -252,14 +252,14 @@ type MachineDeploymentTopology struct { // +optional Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` - // Variables can be used to customize the MachineDeployment through patches. + // variables can be used to customize the MachineDeployment through patches. // +optional Variables *MachineDeploymentVariables `json:"variables,omitempty"` } // MachineHealthCheckTopology defines a MachineHealthCheck for a group of machines. type MachineHealthCheckTopology struct { - // Enable controls if a MachineHealthCheck should be created for the target machines. + // enable controls if a MachineHealthCheck should be created for the target machines. // // If false: No MachineHealthCheck will be created. // @@ -279,39 +279,39 @@ type MachineHealthCheckTopology struct { // MachinePoolTopology specifies the different parameters for a pool of worker nodes in the topology. // This pool of nodes is managed by a MachinePool object whose lifecycle is managed by the Cluster controller. type MachinePoolTopology struct { - // Metadata is the metadata applied to the MachinePool. + // metadata is the metadata applied to the MachinePool. // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. // +optional Metadata ObjectMeta `json:"metadata,omitempty"` - // Class is the name of the MachinePoolClass used to create the pool of worker nodes. + // class is the name of the MachinePoolClass used to create the pool of worker nodes. // This should match one of the deployment classes defined in the ClusterClass object // mentioned in the `Cluster.Spec.Class` field. Class string `json:"class"` - // Name is the unique identifier for this MachinePoolTopology. + // name is the unique identifier for this MachinePoolTopology. // The value is used with other unique identifiers to create a MachinePool's Name // (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, // the values are hashed together. Name string `json:"name"` - // FailureDomains is the list of failure domains the machine pool will be created in. + // failureDomains is the list of failure domains the machine pool will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // +optional FailureDomains []string `json:"failureDomains,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the MachinePool + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the MachinePool // hosts after the MachinePool is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // +optional @@ -324,14 +324,14 @@ type MachinePoolTopology struct { // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // Replicas is the number of nodes belonging to this pool. + // replicas is the number of nodes belonging to this pool. // If the value is nil, the MachinePool is created without the number of Replicas (defaulting to 1) // and it's assumed that an external entity (like cluster autoscaler) is responsible for the management // of this value. // +optional Replicas *int32 `json:"replicas,omitempty"` - // Variables can be used to customize the MachinePool through patches. + // variables can be used to customize the MachinePool through patches. // +optional Variables *MachinePoolVariables `json:"variables,omitempty"` } @@ -339,17 +339,17 @@ type MachinePoolTopology struct { // ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a // Variable definition in the ClusterClass `status` variables. type ClusterVariable struct { - // Name of the variable. + // name of the variable. Name string `json:"name"` - // DefinitionFrom specifies where the definition of this Variable is from. + // definitionFrom specifies where the definition of this Variable is from. // // Deprecated: This field is deprecated, must not be set anymore and is going to be removed in the next apiVersion. // // +optional DefinitionFrom string `json:"definitionFrom,omitempty"` - // Value of the variable. + // value of the variable. // Note: the value will be validated against the schema of the corresponding ClusterClassVariable // from the ClusterClass. // Note: We have to use apiextensionsv1.JSON instead of a custom JSON type, because controller-tools has a @@ -361,7 +361,7 @@ type ClusterVariable struct { // ControlPlaneVariables can be used to provide variables for the ControlPlane. type ControlPlaneVariables struct { - // Overrides can be used to override Cluster level variables. + // overrides can be used to override Cluster level variables. // +optional // +listType=map // +listMapKey=name @@ -370,7 +370,7 @@ type ControlPlaneVariables struct { // MachineDeploymentVariables can be used to provide variables for a specific MachineDeployment. type MachineDeploymentVariables struct { - // Overrides can be used to override Cluster level variables. + // overrides can be used to override Cluster level variables. // +optional // +listType=map // +listMapKey=name @@ -379,7 +379,7 @@ type MachineDeploymentVariables struct { // MachinePoolVariables can be used to provide variables for a specific MachinePool. type MachinePoolVariables struct { - // Overrides can be used to override Cluster level variables. + // overrides can be used to override Cluster level variables. // +optional // +listType=map // +listMapKey=name @@ -393,7 +393,7 @@ type MachinePoolVariables struct { // ClusterNetwork specifies the different networking // parameters for a cluster. type ClusterNetwork struct { - // APIServerPort specifies the port the API Server should bind to. + // apiServerPort specifies the port the API Server should bind to. // Defaults to 6443. // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` @@ -433,31 +433,31 @@ func (n NetworkRanges) String() string { // ClusterStatus defines the observed state of Cluster. type ClusterStatus struct { - // FailureDomains is a slice of failure domain objects synced from the infrastructure provider. + // failureDomains is a slice of failure domain objects synced from the infrastructure provider. // +optional FailureDomains FailureDomains `json:"failureDomains,omitempty"` - // FailureReason indicates that there is a fatal problem reconciling the + // failureReason indicates that there is a fatal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional FailureReason *capierrors.ClusterStatusError `json:"failureReason,omitempty"` - // FailureMessage indicates that there is a fatal problem reconciling the + // failureMessage indicates that there is a fatal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Phase represents the current phase of cluster actuation. + // phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ControlPlaneReady denotes if the control plane became ready during initial provisioning + // controlPlaneReady denotes if the control plane became ready during initial provisioning // to receive requests. // NOTE: this field is part of the Cluster API contract and it is used to orchestrate provisioning. // The value of this field is never updated after provisioning is completed. Please use conditions @@ -465,11 +465,11 @@ type ClusterStatus struct { // +optional ControlPlaneReady bool `json:"controlPlaneReady"` - // Conditions defines current service state of the cluster. + // conditions defines current service state of the cluster. // +optional Conditions Conditions `json:"conditions,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -778,11 +778,11 @@ func (in FailureDomains) GetIDs() []*string { // FailureDomainSpec is the Schema for Cluster API failure domains. // It allows controllers to understand how many failure domains a cluster can optionally span across. type FailureDomainSpec struct { - // ControlPlane determines if this failure domain is suitable for use by control plane machines. + // controlPlane determines if this failure domain is suitable for use by control plane machines. // +optional ControlPlane bool `json:"controlPlane,omitempty"` - // Attributes is a free form map of attributes an infrastructure provider might use or require. + // attributes is a free form map of attributes an infrastructure provider might use or require. // +optional Attributes map[string]string `json:"attributes,omitempty"` } diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go index c72063293434..b93a68bc15a4 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/v1beta1/clusterclass_types.go @@ -45,7 +45,7 @@ type ClusterClass struct { // ClusterClassSpec describes the desired state of the ClusterClass. type ClusterClassSpec struct { - // Infrastructure is a reference to a provider-specific template that holds + // infrastructure is a reference to a provider-specific template that holds // the details for provisioning infrastructure specific cluster // for the underlying provider. // The underlying provider is responsible for the implementation @@ -53,23 +53,23 @@ type ClusterClassSpec struct { // +optional Infrastructure LocalObjectTemplate `json:"infrastructure,omitempty"` - // ControlPlane is a reference to a local struct that holds the details + // controlPlane is a reference to a local struct that holds the details // for provisioning the Control Plane for the Cluster. // +optional ControlPlane ControlPlaneClass `json:"controlPlane,omitempty"` - // Workers describes the worker nodes for the cluster. + // workers describes the worker nodes for the cluster. // It is a collection of node types which can be used to create // the worker nodes of the cluster. // +optional Workers WorkersClass `json:"workers,omitempty"` - // Variables defines the variables which can be configured + // variables defines the variables which can be configured // in the Cluster topology and are then used in patches. // +optional Variables []ClusterClassVariable `json:"variables,omitempty"` - // Patches defines the patches which are applied to customize + // patches defines the patches which are applied to customize // referenced templates of a ClusterClass. // Note: Patches will be applied in the order of the array. // +optional @@ -78,7 +78,7 @@ type ClusterClassSpec struct { // ControlPlaneClass defines the class for the control plane. type ControlPlaneClass struct { - // Metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane + // metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane // if the ControlPlaneTemplate referenced is machine based. If not, it is applied only to the // ControlPlane. // At runtime this metadata is merged with the corresponding metadata from the topology. @@ -91,7 +91,7 @@ type ControlPlaneClass struct { // LocalObjectTemplate contains the reference to the control plane provider. LocalObjectTemplate `json:",inline"` - // MachineInfrastructure 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 @@ -100,30 +100,30 @@ type ControlPlaneClass struct { // +optional MachineInfrastructure *LocalObjectTemplate `json:"machineInfrastructure,omitempty"` - // MachineHealthCheck defines a MachineHealthCheck for this ControlPlaneClass. + // machineHealthCheck defines a MachineHealthCheck for this ControlPlaneClass. // This field is supported if and only if the ControlPlane provider template // referenced above is Machine based and supports setting replicas. // +optional MachineHealthCheck *MachineHealthCheckClass `json:"machineHealthCheck,omitempty"` - // NamingStrategy allows changing the naming pattern used when creating the control plane provider object. + // namingStrategy allows changing the naming pattern used when creating the control plane provider object. // +optional NamingStrategy *ControlPlaneClassNamingStrategy `json:"namingStrategy,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // NOTE: This value can be overridden while defining a Cluster.Topology. // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // NOTE: This value can be overridden while defining a Cluster.Topology. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // NOTE: This value can be overridden while defining a Cluster.Topology. @@ -133,7 +133,7 @@ type ControlPlaneClass struct { // ControlPlaneClassNamingStrategy defines the naming strategy for control plane objects. type ControlPlaneClassNamingStrategy struct { - // Template defines the template to use for generating the name of the ControlPlane object. + // template defines the template to use for generating the name of the ControlPlane object. // If not defined, it will fallback to `{{ .cluster.name }}-{{ .random }}`. // If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will // get concatenated with a random suffix of length 5. @@ -146,14 +146,14 @@ type ControlPlaneClassNamingStrategy struct { // WorkersClass is a collection of deployment classes. type WorkersClass struct { - // MachineDeployments is a list of machine deployment classes that can be used to create + // machineDeployments is a list of machine deployment classes that can be used to create // a set of worker nodes. // +optional // +listType=map // +listMapKey=class MachineDeployments []MachineDeploymentClass `json:"machineDeployments,omitempty"` - // MachinePools is a list of machine pool classes that can be used to create + // machinePools is a list of machine pool classes that can be used to create // a set of worker nodes. // +optional // +listType=map @@ -164,43 +164,43 @@ type WorkersClass struct { // MachineDeploymentClass serves as a template to define a set of worker nodes of the cluster // provisioned using the `ClusterClass`. type MachineDeploymentClass struct { - // Class denotes a type of worker node present in the cluster, + // class denotes a type of worker node present in the cluster, // this name MUST be unique within a ClusterClass and can be referenced // in the Cluster to create a managed MachineDeployment. Class string `json:"class"` - // Template is a local struct containing a collection of templates for creation of + // template is a local struct containing a collection of templates for creation of // MachineDeployment objects representing a set of worker nodes. Template MachineDeploymentClassTemplate `json:"template"` - // MachineHealthCheck defines a MachineHealthCheck for this MachineDeploymentClass. + // machineHealthCheck defines a MachineHealthCheck for this MachineDeploymentClass. // +optional MachineHealthCheck *MachineHealthCheckClass `json:"machineHealthCheck,omitempty"` - // FailureDomain is the failure domain the machines will be created in. + // failureDomain is the failure domain the machines will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. // +optional FailureDomain *string `json:"failureDomain,omitempty"` - // NamingStrategy allows changing the naming pattern used when creating the MachineDeployment. + // namingStrategy allows changing the naming pattern used when creating the MachineDeployment. // +optional NamingStrategy *MachineDeploymentClassNamingStrategy `json:"namingStrategy,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. @@ -223,23 +223,23 @@ type MachineDeploymentClass struct { // MachineDeploymentClassTemplate defines how a MachineDeployment generated from a MachineDeploymentClass // should look like. type MachineDeploymentClassTemplate struct { - // Metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. + // metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. // At runtime this metadata is merged with the corresponding metadata from the topology. // +optional Metadata ObjectMeta `json:"metadata,omitempty"` - // Bootstrap contains the bootstrap template reference to be used + // bootstrap contains the bootstrap template reference to be used // for the creation of worker Machines. Bootstrap LocalObjectTemplate `json:"bootstrap"` - // Infrastructure contains the infrastructure template reference to be used + // infrastructure contains the infrastructure template reference to be used // for the creation of worker Machines. Infrastructure LocalObjectTemplate `json:"infrastructure"` } // MachineDeploymentClassNamingStrategy defines the naming strategy for machine deployment objects. type MachineDeploymentClassNamingStrategy struct { - // Template defines the template to use for generating the name of the MachineDeployment object. + // template defines the template to use for generating the name of the MachineDeployment object. // If not defined, it will fallback to `{{ .cluster.name }}-{{ .machineDeployment.topologyName }}-{{ .random }}`. // If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will // get concatenated with a random suffix of length 5. @@ -253,7 +253,7 @@ type MachineDeploymentClassNamingStrategy struct { // MachineHealthCheckClass defines a MachineHealthCheck for a group of Machines. type MachineHealthCheckClass struct { - // UnhealthyConditions contains a list of the conditions that determine + // unhealthyConditions contains a list of the conditions that determine // whether a node is considered unhealthy. The conditions are combined in a // logical OR, i.e. if any of the conditions is met, the node is unhealthy. // @@ -274,7 +274,7 @@ type MachineHealthCheckClass struct { // +kubebuilder:validation:Pattern=^\[[0-9]+-[0-9]+\]$ UnhealthyRange *string `json:"unhealthyRange,omitempty"` - // NodeStartupTimeout allows to set the maximum time for MachineHealthCheck + // nodeStartupTimeout allows to set the maximum time for MachineHealthCheck // to consider a Machine unhealthy if a corresponding Node isn't associated // through a `Spec.ProviderID` field. // @@ -289,7 +289,7 @@ type MachineHealthCheckClass struct { // +optional NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - // RemediationTemplate is a reference to a remediation template + // remediationTemplate is a reference to a remediation template // provided by an infrastructure provider. // // This field is completely optional, when filled, the MachineHealthCheck controller @@ -302,39 +302,39 @@ type MachineHealthCheckClass struct { // MachinePoolClass serves as a template to define a pool of worker nodes of the cluster // provisioned using `ClusterClass`. type MachinePoolClass struct { - // Class denotes a type of machine pool present in the cluster, + // class denotes a type of machine pool present in the cluster, // this name MUST be unique within a ClusterClass and can be referenced // in the Cluster to create a managed MachinePool. Class string `json:"class"` - // Template is a local struct containing a collection of templates for creation of + // template is a local struct containing a collection of templates for creation of // MachinePools objects representing a pool of worker nodes. Template MachinePoolClassTemplate `json:"template"` - // FailureDomains is the list of failure domains the MachinePool should be attached to. + // failureDomains is the list of failure domains the MachinePool should be attached to. // Must match a key in the FailureDomains map stored on the cluster object. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. // +optional FailureDomains []string `json:"failureDomains,omitempty"` - // NamingStrategy allows changing the naming pattern used when creating the MachinePool. + // namingStrategy allows changing the naming pattern used when creating the MachinePool. // +optional NamingStrategy *MachinePoolClassNamingStrategy `json:"namingStrategy,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine Pool is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. @@ -352,23 +352,23 @@ type MachinePoolClass struct { // MachinePoolClassTemplate defines how a MachinePool generated from a MachinePoolClass // should look like. type MachinePoolClassTemplate struct { - // Metadata is the metadata applied to the MachinePool. + // metadata is the metadata applied to the MachinePool. // At runtime this metadata is merged with the corresponding metadata from the topology. // +optional Metadata ObjectMeta `json:"metadata,omitempty"` - // Bootstrap contains the bootstrap template reference to be used + // bootstrap contains the bootstrap template reference to be used // for the creation of the Machines in the MachinePool. Bootstrap LocalObjectTemplate `json:"bootstrap"` - // Infrastructure contains the infrastructure template reference to be used + // infrastructure contains the infrastructure template reference to be used // for the creation of the MachinePool. Infrastructure LocalObjectTemplate `json:"infrastructure"` } // MachinePoolClassNamingStrategy defines the naming strategy for machine pool objects. type MachinePoolClassNamingStrategy struct { - // Template defines the template to use for generating the name of the MachinePool object. + // template defines the template to use for generating the name of the MachinePool object. // If not defined, it will fallback to `{{ .cluster.name }}-{{ .machinePool.topologyName }}-{{ .random }}`. // If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will // get concatenated with a random suffix of length 5. @@ -388,16 +388,16 @@ func (m MachineHealthCheckClass) IsZero() bool { // ClusterClassVariable defines a variable which can // be configured in the Cluster topology and used in patches. type ClusterClassVariable struct { - // Name of the variable. + // name of the variable. Name string `json:"name"` - // Required specifies if the variable is required. + // required specifies if the variable is required. // Note: this applies to the variable as a whole and thus the // top-level object defined in the schema. If nested fields are // required, this will be specified inside the schema. Required bool `json:"required"` - // Metadata is the metadata of a variable. + // metadata is the metadata of a variable. // It can be used to add additional data for higher level tools to // a ClusterClassVariable. // @@ -406,7 +406,7 @@ type ClusterClassVariable struct { // +optional Metadata ClusterClassVariableMetadata `json:"metadata,omitempty"` - // Schema defines the schema of the variable. + // schema defines the schema of the variable. Schema VariableSchema `json:"schema"` } @@ -421,7 +421,7 @@ type ClusterClassVariableMetadata struct { // +optional Labels map[string]string `json:"labels,omitempty"` - // Annotations is an unstructured key value map that can be used to store and + // annotations is an unstructured key value map that can be used to store and // retrieve arbitrary metadata. // They are not queryable. // +optional @@ -430,7 +430,7 @@ type ClusterClassVariableMetadata struct { // VariableSchema defines the schema of a variable. type VariableSchema struct { - // OpenAPIV3Schema defines the schema of a variable via OpenAPI v3 + // openAPIV3Schema defines the schema of a variable via OpenAPI v3 // schema. The schema is a subset of the schema used in // Kubernetes CRDs. OpenAPIV3Schema JSONSchemaProps `json:"openAPIV3Schema"` @@ -442,17 +442,17 @@ type VariableSchema struct { // This struct has been initially copied from apiextensionsv1.JSONSchemaProps, but all fields // which are not supported in CAPI have been removed. type JSONSchemaProps struct { - // Description is a human-readable description of this variable. + // description is a human-readable description of this variable. Description string `json:"description,omitempty"` - // Example is an example for this variable. + // example is an example for this variable. Example *apiextensionsv1.JSON `json:"example,omitempty"` - // Type is the type of the variable. + // type is the type of the variable. // Valid values are: object, array, string, integer, number or boolean. Type string `json:"type"` - // Properties specifies fields of an object. + // properties specifies fields of an object. // NOTE: Can only be set if type is object. // NOTE: Properties is mutually exclusive with AdditionalProperties. // NOTE: This field uses PreserveUnknownFields and Schemaless, @@ -462,7 +462,7 @@ type JSONSchemaProps struct { // +kubebuilder:validation:Schemaless Properties map[string]JSONSchemaProps `json:"properties,omitempty"` - // AdditionalProperties specifies the schema of values in a map (keys are always strings). + // additionalProperties specifies the schema of values in a map (keys are always strings). // NOTE: Can only be set if type is object. // NOTE: AdditionalProperties is mutually exclusive with Properties. // NOTE: This field uses PreserveUnknownFields and Schemaless, @@ -472,22 +472,22 @@ type JSONSchemaProps struct { // +kubebuilder:validation:Schemaless AdditionalProperties *JSONSchemaProps `json:"additionalProperties,omitempty"` - // MaxProperties is the maximum amount of entries in a map or properties in an object. + // maxProperties is the maximum amount of entries in a map or properties in an object. // NOTE: Can only be set if type is object. // +optional MaxProperties *int64 `json:"maxProperties,omitempty"` - // MinProperties is the minimum amount of entries in a map or properties in an object. + // minProperties is the minimum amount of entries in a map or properties in an object. // NOTE: Can only be set if type is object. // +optional MinProperties *int64 `json:"minProperties,omitempty"` - // Required specifies which fields of an object are required. + // required specifies which fields of an object are required. // NOTE: Can only be set if type is object. // +optional Required []string `json:"required,omitempty"` - // Items specifies fields of an array. + // items specifies fields of an array. // NOTE: Can only be set if type is array. // NOTE: This field uses PreserveUnknownFields and Schemaless, // because recursive validation is not possible. @@ -496,90 +496,90 @@ type JSONSchemaProps struct { // +kubebuilder:validation:Schemaless Items *JSONSchemaProps `json:"items,omitempty"` - // MaxItems is the max length of an array variable. + // maxItems is the max length of an array variable. // NOTE: Can only be set if type is array. // +optional MaxItems *int64 `json:"maxItems,omitempty"` - // MinItems is the min length of an array variable. + // minItems is the min length of an array variable. // NOTE: Can only be set if type is array. // +optional MinItems *int64 `json:"minItems,omitempty"` - // UniqueItems specifies if items in an array must be unique. + // uniqueItems specifies if items in an array must be unique. // NOTE: Can only be set if type is array. // +optional UniqueItems bool `json:"uniqueItems,omitempty"` - // Format is an OpenAPI v3 format string. Unknown formats are ignored. + // format is an OpenAPI v3 format string. Unknown formats are ignored. // For a list of supported formats please see: (of the k8s.io/apiextensions-apiserver version we're currently using) // https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apiserver/validation/formats.go // NOTE: Can only be set if type is string. // +optional Format string `json:"format,omitempty"` - // MaxLength is the max length of a string variable. + // maxLength is the max length of a string variable. // NOTE: Can only be set if type is string. // +optional MaxLength *int64 `json:"maxLength,omitempty"` - // MinLength is the min length of a string variable. + // minLength is the min length of a string variable. // NOTE: Can only be set if type is string. // +optional MinLength *int64 `json:"minLength,omitempty"` - // Pattern is the regex which a string variable must match. + // pattern is the regex which a string variable must match. // NOTE: Can only be set if type is string. // +optional Pattern string `json:"pattern,omitempty"` - // Maximum is the maximum of an integer or number variable. + // maximum is the maximum of an integer or number variable. // If ExclusiveMaximum is false, the variable is valid if it is lower than, or equal to, the value of Maximum. // If ExclusiveMaximum is true, the variable is valid if it is strictly lower than the value of Maximum. // NOTE: Can only be set if type is integer or number. // +optional Maximum *int64 `json:"maximum,omitempty"` - // ExclusiveMaximum specifies if the Maximum is exclusive. + // exclusiveMaximum specifies if the Maximum is exclusive. // NOTE: Can only be set if type is integer or number. // +optional ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` - // Minimum is the minimum of an integer or number variable. + // minimum is the minimum of an integer or number variable. // If ExclusiveMinimum is false, the variable is valid if it is greater than, or equal to, the value of Minimum. // If ExclusiveMinimum is true, the variable is valid if it is strictly greater than the value of Minimum. // NOTE: Can only be set if type is integer or number. // +optional Minimum *int64 `json:"minimum,omitempty"` - // ExclusiveMinimum specifies if the Minimum is exclusive. + // exclusiveMinimum specifies if the Minimum is exclusive. // NOTE: Can only be set if type is integer or number. // +optional ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` - // XPreserveUnknownFields allows setting fields in a variable object + // x-kubernetes-preserve-unknown-fields allows setting fields in a variable object // which are not defined in the variable schema. This affects fields recursively, // except if nested properties or additionalProperties are specified in the schema. // +optional XPreserveUnknownFields bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` - // Enum is the list of valid values of the variable. + // enum is the list of valid values of the variable. // NOTE: Can be set for all types. // +optional Enum []apiextensionsv1.JSON `json:"enum,omitempty"` - // Default is the default value of the variable. + // default is the default value of the variable. // NOTE: Can be set for all types. // +optional Default *apiextensionsv1.JSON `json:"default,omitempty"` - // XValidations describes a list of validation rules written in the CEL expression language. + // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. // +optional // +listType=map // +listMapKey=rule XValidations []ValidationRule `json:"x-kubernetes-validations,omitempty"` - // XMetadata is the metadata of a variable or a nested field within a variable. + // x-metadata 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. // +optional XMetadata *VariableSchemaMetadata `json:"x-metadata,omitempty"` @@ -600,7 +600,7 @@ type JSONSchemaProps struct { // +optional XIntOrString bool `json:"x-kubernetes-int-or-string,omitempty"` - // AllOf specifies that the variable must validate against all of the subschemas in the array. + // allOf specifies that the variable must validate against all of the subschemas in the array. // NOTE: This field uses PreserveUnknownFields and Schemaless, // because recursive validation is not possible. // +optional @@ -608,7 +608,7 @@ type JSONSchemaProps struct { // +kubebuilder:validation:Schemaless AllOf []JSONSchemaProps `json:"allOf,omitempty"` - // OneOf specifies that the variable must validate against exactly one of the subschemas in the array. + // oneOf specifies that the variable must validate against exactly one of the subschemas in the array. // NOTE: This field uses PreserveUnknownFields and Schemaless, // because recursive validation is not possible. // +optional @@ -616,7 +616,7 @@ type JSONSchemaProps struct { // +kubebuilder:validation:Schemaless OneOf []JSONSchemaProps `json:"oneOf,omitempty"` - // AnyOf specifies that the variable must validate against one or more of the subschemas in the array. + // anyOf specifies that the variable must validate against one or more of the subschemas in the array. // NOTE: This field uses PreserveUnknownFields and Schemaless, // because recursive validation is not possible. // +optional @@ -624,7 +624,7 @@ type JSONSchemaProps struct { // +kubebuilder:validation:Schemaless AnyOf []JSONSchemaProps `json:"anyOf,omitempty"` - // Not specifies that the variable must not validate against the subschema. + // not specifies that the variable must not validate against the subschema. // NOTE: This field uses PreserveUnknownFields and Schemaless, // because recursive validation is not possible. // +optional @@ -641,7 +641,7 @@ type VariableSchemaMetadata struct { // +optional Labels map[string]string `json:"labels,omitempty"` - // Annotations is an unstructured key value map that can be used to store and + // annotations is an unstructured key value map that can be used to store and // retrieve arbitrary metadata. // They are not queryable. // +optional @@ -650,7 +650,7 @@ type VariableSchemaMetadata struct { // ValidationRule describes a validation rule written in the CEL expression language. type ValidationRule struct { - // Rule represents the expression which will be evaluated by CEL. + // rule represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. // The `self` variable in the CEL expression is bound to the scoped value. @@ -700,13 +700,13 @@ type ValidationRule struct { // // +kubebuilder:validation:Required Rule string `json:"rule"` - // Message represents the message displayed when validation fails. The message is required if the Rule contains + // message represents the message displayed when validation fails. The message is required if the Rule contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" // +optional Message string `json:"message,omitempty"` - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a rule, then messageExpression will be used if validation // fails. If messageExpression results in a runtime error, the validation failure message is produced @@ -717,7 +717,7 @@ type ValidationRule struct { // "x must be less than max ("+string(self.max)+")" // +optional MessageExpression string `json:"messageExpression,omitempty"` - // Reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. + // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". // If not set, default to use "FieldValueInvalid". // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. @@ -726,7 +726,7 @@ type ValidationRule struct { // +kubebuilder:default=FieldValueInvalid // +default=ref(sigs.k8s.io/cluster-api/api/v1beta1.FieldValueInvalid) Reason FieldValueErrorReason `json:"reason,omitempty"` - // FieldPath represents the field path returned when the validation fails. + // fieldPath represents the field path returned when the validation fails. // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` @@ -760,13 +760,13 @@ const ( // ClusterClassPatch defines a patch which is applied to customize the referenced templates. type ClusterClassPatch struct { - // Name of the patch. + // name of the patch. Name string `json:"name"` - // Description is a human-readable description of this patch. + // description is a human-readable description of this patch. Description string `json:"description,omitempty"` - // EnabledIf is a Go template to be used to calculate if a patch should be enabled. + // enabledIf is a Go template to be used to calculate if a patch should be enabled. // It can reference variables defined in .spec.variables and builtin variables. // The patch will be enabled if the template evaluates to `true`, otherwise it will // be disabled. @@ -774,13 +774,13 @@ type ClusterClassPatch struct { // +optional EnabledIf *string `json:"enabledIf,omitempty"` - // Definitions define inline patches. + // definitions define inline patches. // Note: Patches will be applied in the order of the array. // Note: Exactly one of Definitions or External must be set. // +optional Definitions []PatchDefinition `json:"definitions,omitempty"` - // External defines an external patch. + // external defines an external patch. // Note: Exactly one of Definitions or External must be set. // +optional External *ExternalPatchDefinition `json:"external,omitempty"` @@ -788,10 +788,10 @@ type ClusterClassPatch struct { // PatchDefinition defines a patch which is applied to customize the referenced templates. type PatchDefinition struct { - // Selector defines on which templates the patch should be applied. + // selector defines on which templates the patch should be applied. Selector PatchSelector `json:"selector"` - // JSONPatches defines the patches which should be applied on the templates + // jsonPatches defines the patches which should be applied on the templates // matching the selector. // Note: Patches will be applied in the order of the array. JSONPatches []JSONPatch `json:"jsonPatches"` @@ -803,13 +803,13 @@ type PatchDefinition struct { // be automatically updated during reconciliation if there is a newer version for the same contract. // Note: The results of selection based on the individual fields are ANDed. type PatchSelector struct { - // APIVersion filters templates by apiVersion. + // apiVersion filters templates by apiVersion. APIVersion string `json:"apiVersion"` - // Kind filters templates by kind. + // kind filters templates by kind. Kind string `json:"kind"` - // MatchResources selects templates based on where they are referenced. + // matchResources selects templates based on where they are referenced. MatchResources PatchSelectorMatch `json:"matchResources"` } @@ -817,22 +817,22 @@ type PatchSelector struct { // Note: The selector must match at least one template. // Note: The results of selection based on the individual fields are ORed. type PatchSelectorMatch struct { - // ControlPlane selects templates referenced in .spec.ControlPlane. + // controlPlane selects templates referenced in .spec.ControlPlane. // Note: this will match the controlPlane and also the controlPlane // machineInfrastructure (depending on the kind and apiVersion). // +optional ControlPlane bool `json:"controlPlane,omitempty"` - // InfrastructureCluster selects templates referenced in .spec.infrastructure. + // infrastructureCluster selects templates referenced in .spec.infrastructure. // +optional InfrastructureCluster bool `json:"infrastructureCluster,omitempty"` - // MachineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in + // machineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in // .spec.workers.machineDeployments. // +optional MachineDeploymentClass *PatchSelectorMatchMachineDeploymentClass `json:"machineDeploymentClass,omitempty"` - // MachinePoolClass selects templates referenced in specific MachinePoolClasses in + // machinePoolClass selects templates referenced in specific MachinePoolClasses in // .spec.workers.machinePools. // +optional MachinePoolClass *PatchSelectorMatchMachinePoolClass `json:"machinePoolClass,omitempty"` @@ -841,7 +841,7 @@ type PatchSelectorMatch struct { // PatchSelectorMatchMachineDeploymentClass selects templates referenced // in specific MachineDeploymentClasses in .spec.workers.machineDeployments. type PatchSelectorMatchMachineDeploymentClass struct { - // Names selects templates by class names. + // names selects templates by class names. // +optional Names []string `json:"names,omitempty"` } @@ -849,25 +849,25 @@ type PatchSelectorMatchMachineDeploymentClass struct { // PatchSelectorMatchMachinePoolClass selects templates referenced // in specific MachinePoolClasses in .spec.workers.machinePools. type PatchSelectorMatchMachinePoolClass struct { - // Names selects templates by class names. + // names selects templates by class names. // +optional Names []string `json:"names,omitempty"` } // JSONPatch defines a JSON patch. type JSONPatch struct { - // Op defines the operation of the patch. + // op defines the operation of the patch. // Note: Only `add`, `replace` and `remove` are supported. Op string `json:"op"` - // Path defines the path of the patch. + // path defines the path of the patch. // Note: Only the spec of a template can be patched, thus the path has to start with /spec/. // Note: For now the only allowed array modifications are `append` and `prepend`, i.e.: // * for op: `add`: only index 0 (prepend) and - (append) are allowed // * for op: `replace` or `remove`: no indexes are allowed Path string `json:"path"` - // Value defines the value of the patch. + // value defines the value of the patch. // Note: Either Value or ValueFrom is required for add and replace // operations. Only one of them is allowed to be set at the same time. // Note: We have to use apiextensionsv1.JSON instead of our JSON type, @@ -877,7 +877,7 @@ type JSONPatch struct { // +optional Value *apiextensionsv1.JSON `json:"value,omitempty"` - // ValueFrom defines the value of the patch. + // valueFrom defines the value of the patch. // Note: Either Value or ValueFrom is required for add and replace // operations. Only one of them is allowed to be set at the same time. // +optional @@ -887,12 +887,12 @@ type JSONPatch struct { // JSONPatchValue defines the value of a patch. // Note: Only one of the fields is allowed to be set at the same time. type JSONPatchValue struct { - // Variable is the variable to be used as value. + // variable is the variable to be used as value. // Variable can be one of the variables defined in .spec.variables or a builtin variable. // +optional Variable *string `json:"variable,omitempty"` - // Template is the Go template to be used to calculate the value. + // template is the Go template to be used to calculate the value. // A template can reference variables defined in .spec.variables and builtin variables. // Note: The template must evaluate to a valid YAML or JSON value. // +optional @@ -902,19 +902,19 @@ type JSONPatchValue struct { // ExternalPatchDefinition defines an external patch. // Note: At least one of GenerateExtension or ValidateExtension must be set. type ExternalPatchDefinition struct { - // GenerateExtension references an extension which is called to generate patches. + // generateExtension references an extension which is called to generate patches. // +optional GenerateExtension *string `json:"generateExtension,omitempty"` - // ValidateExtension references an extension which is called to validate the topology. + // validateExtension references an extension which is called to validate the topology. // +optional ValidateExtension *string `json:"validateExtension,omitempty"` - // DiscoverVariablesExtension references an extension which is called to discover variables. + // discoverVariablesExtension references an extension which is called to discover variables. // +optional DiscoverVariablesExtension *string `json:"discoverVariablesExtension,omitempty"` - // Settings defines key value pairs to be passed to the extensions. + // settings defines key value pairs to be passed to the extensions. // Values defined here take precedence over the values defined in the // corresponding ExtensionConfig. // +optional @@ -923,7 +923,7 @@ type ExternalPatchDefinition struct { // LocalObjectTemplate defines a template for a topology Class. type LocalObjectTemplate struct { - // Ref is a required reference to a custom resource + // ref is a required reference to a custom resource // offered by a provider. Ref *corev1.ObjectReference `json:"ref"` } @@ -932,15 +932,15 @@ type LocalObjectTemplate struct { // ClusterClassStatus defines the observed state of the ClusterClass. type ClusterClassStatus struct { - // Variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass. + // variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass. // +optional Variables []ClusterClassStatusVariable `json:"variables,omitempty"` - // Conditions defines current observed state of the ClusterClass. + // conditions defines current observed state of the ClusterClass. // +optional Conditions Conditions `json:"conditions,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -963,31 +963,31 @@ type ClusterClassV1Beta2Status struct { // ClusterClassStatusVariable defines a variable which appears in the status of a ClusterClass. type ClusterClassStatusVariable struct { - // Name is the name of the variable. + // name is the name of the variable. Name string `json:"name"` - // DefinitionsConflict specifies whether or not there are conflicting definitions for a single variable name. + // definitionsConflict specifies whether or not there are conflicting definitions for a single variable name. // +optional DefinitionsConflict bool `json:"definitionsConflict"` - // Definitions is a list of definitions for a variable. + // definitions is a list of definitions for a variable. Definitions []ClusterClassStatusVariableDefinition `json:"definitions"` } // ClusterClassStatusVariableDefinition defines a variable which appears in the status of a ClusterClass. type ClusterClassStatusVariableDefinition struct { - // From specifies the origin of the variable definition. + // from specifies the origin of the variable definition. // This will be `inline` for variables defined in the ClusterClass or the name of a patch defined in the ClusterClass // for variables discovered from a DiscoverVariables runtime extensions. From string `json:"from"` - // Required specifies if the variable is required. + // required specifies if the variable is required. // Note: this applies to the variable as a whole and thus the // top-level object defined in the schema. If nested fields are // required, this will be specified inside the schema. Required bool `json:"required"` - // Metadata is the metadata of a variable. + // metadata is the metadata of a variable. // It can be used to add additional data for higher level tools to // a ClusterClassVariable. // @@ -996,7 +996,7 @@ type ClusterClassStatusVariableDefinition struct { // +optional Metadata ClusterClassVariableMetadata `json:"metadata,omitempty"` - // Schema defines the schema of the variable. + // schema defines the schema of the variable. Schema VariableSchema `json:"schema"` } diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go index 860b8d28752e..f70b0f3e4a36 100644 --- a/api/v1beta1/common_types.go +++ b/api/v1beta1/common_types.go @@ -312,7 +312,7 @@ type ObjectMeta struct { // +optional Labels map[string]string `json:"labels,omitempty"` - // Annotations is an unstructured key value map stored with a resource that may be + // annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations diff --git a/api/v1beta1/condition_types.go b/api/v1beta1/condition_types.go index a66cf9bc838c..e647f89a2d7b 100644 --- a/api/v1beta1/condition_types.go +++ b/api/v1beta1/condition_types.go @@ -53,15 +53,15 @@ type ConditionType string // Condition defines an observation of a Cluster API resource operational state. type Condition struct { - // Type of condition in CamelCase or in foo.example.com/CamelCase. + // type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions // can be useful (see .node.status.conditions), the ability to deconflict is important. Type ConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` - // Severity provides an explicit classification of Reason code, so the users or machines can immediately + // severity provides an explicit classification of Reason code, so the users or machines can immediately // understand the current situation and act accordingly. // The Severity field MUST be set only when Status=False. // +optional diff --git a/api/v1beta1/machine_types.go b/api/v1beta1/machine_types.go index 8ed7c7b95662..ba2673902079 100644 --- a/api/v1beta1/machine_types.go +++ b/api/v1beta1/machine_types.go @@ -90,24 +90,24 @@ const ( // MachineSpec defines the desired state of Machine. type MachineSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Bootstrap is a reference to a local struct which encapsulates + // bootstrap is a reference to a local struct which encapsulates // fields to configure the Machine’s bootstrapping mechanism. Bootstrap Bootstrap `json:"bootstrap"` - // InfrastructureRef is a required reference to a custom resource + // infrastructureRef is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` - // Version defines the desired Kubernetes version. + // version defines the desired Kubernetes version. // This field is meant to be optionally used by bootstrap providers. // +optional Version *string `json:"version,omitempty"` - // ProviderID is the identification ID of the machine provided by the provider. + // providerID is the identification ID of the machine provided by the provider. // This field must match the provider ID as seen on the node object corresponding to this machine. // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler // 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 { // +optional ProviderID *string `json:"providerID,omitempty"` - // FailureDomain is the failure domain the machine will be created in. + // failureDomain is the failure domain the machine will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // +optional FailureDomain *string `json:"failureDomain,omitempty"` @@ -149,18 +149,18 @@ type MachineSpec struct { // +kubebuilder:validation:MaxItems=32 ReadinessGates []MachineReadinessGate `json:"readinessGates,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // Defaults to 10 seconds. // +optional @@ -185,20 +185,20 @@ type MachineReadinessGate struct { // MachineStatus defines the observed state of Machine. type MachineStatus struct { - // NodeRef will point to the corresponding Node if it exists. + // nodeRef will point to the corresponding Node if it exists. // +optional NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - // NodeInfo is a set of ids/uuids to uniquely identify the node. + // nodeInfo is a set of ids/uuids to uniquely identify the node. // More info: https://kubernetes.io/docs/concepts/nodes/node/#info // +optional NodeInfo *corev1.NodeSystemInfo `json:"nodeInfo,omitempty"` - // LastUpdated identifies when the phase of the Machine last transitioned. + // lastUpdated identifies when the phase of the Machine last transitioned. // +optional LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - // FailureReason will be set in the event that there is a terminal problem + // failureReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // @@ -217,7 +217,7 @@ type MachineStatus struct { // +optional FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"` - // FailureMessage will be set in the event that there is a terminal problem + // failureMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // @@ -236,34 +236,34 @@ type MachineStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Addresses is a list of addresses assigned to the machine. + // addresses is a list of addresses assigned to the machine. // This field is copied from the infrastructure provider reference. // +optional Addresses MachineAddresses `json:"addresses,omitempty"` - // Phase represents the current phase of machine actuation. + // phase represents the current phase of machine actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // CertificatesExpiryDate is the expiry date of the machine certificates. + // certificatesExpiryDate is the expiry date of the machine certificates. // This value is only set for control plane machines. // +optional CertificatesExpiryDate *metav1.Time `json:"certificatesExpiryDate,omitempty"` - // BootstrapReady is the state of the bootstrap provider. + // bootstrapReady is the state of the bootstrap provider. // +optional BootstrapReady bool `json:"bootstrapReady"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the Machine. + // conditions defines current service state of the Machine. // +optional Conditions Conditions `json:"conditions,omitempty"` @@ -339,14 +339,14 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase { // Bootstrap encapsulates fields to configure the Machine’s bootstrapping mechanism. type Bootstrap struct { - // ConfigRef is a reference to a bootstrap provider-specific resource + // configRef is a reference to a bootstrap provider-specific resource // that holds configuration details. The reference is optional to // allow users/operators to specify Bootstrap.DataSecretName without // the need of a controller. // +optional ConfigRef *corev1.ObjectReference `json:"configRef,omitempty"` - // DataSecretName is the name of the secret that stores the bootstrap data script. + // dataSecretName is the name of the secret that stores the bootstrap data script. // If nil, the Machine should remain in the Pending state. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go index fe4d4a198edd..08dd8a78bd5f 100644 --- a/api/v1beta1/machinedeployment_types.go +++ b/api/v1beta1/machinedeployment_types.go @@ -81,7 +81,7 @@ const ( // MachineDeploymentSpec defines the desired state of MachineDeployment. type MachineDeploymentSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` @@ -105,7 +105,7 @@ type MachineDeploymentSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // RolloutAfter is a field to indicate a rollout should be performed + // rolloutAfter is a field to indicate a rollout should be performed // after the specified time even if no changes have been made to the // MachineDeployment. // Example: In the YAML the time can be specified in the RFC3339 format. @@ -119,7 +119,7 @@ type MachineDeploymentSpec struct { // It must match the machine template's labels. Selector metav1.LabelSelector `json:"selector"` - // Template describes the machines that will be created. + // template describes the machines that will be created. Template MachineTemplateSpec `json:"template"` // The deployment strategy to use to replace existing machines with @@ -127,7 +127,7 @@ type MachineDeploymentSpec struct { // +optional Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` - // MinReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. + // minReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. // Defaults to 0 (machine will be considered available as soon as the Node is ready) // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` @@ -161,7 +161,7 @@ type MachineDeploymentSpec struct { // MachineDeploymentStrategy describes how to replace existing machines // with new ones. type MachineDeploymentStrategy struct { - // Type of deployment. Allowed values are RollingUpdate and OnDelete. + // type of deployment. Allowed values are RollingUpdate and OnDelete. // The default is RollingUpdate. // +kubebuilder:validation:Enum=RollingUpdate;OnDelete // +optional @@ -172,7 +172,7 @@ type MachineDeploymentStrategy struct { // +optional RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` - // Remediation controls the strategy of remediating unhealthy machines + // remediation controls the strategy of remediating unhealthy machines // and how remediating operations should occur during the lifecycle of the dependant MachineSets. // +optional Remediation *RemediationStrategy `json:"remediation,omitempty"` @@ -215,7 +215,7 @@ type MachineRollingUpdateDeployment struct { // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` - // DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. + // deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. // Valid values are "Random, "Newest", "Oldest" // When no value is supplied, the default DeletePolicy of MachineSet is used // +kubebuilder:validation:Enum=Random;Newest;Oldest @@ -229,7 +229,7 @@ type MachineRollingUpdateDeployment struct { // RemediationStrategy allows to define how the MachineSet can control scaling operations. type RemediationStrategy struct { - // MaxInFlight determines how many in flight remediations should happen at the same time. + // maxInFlight determines how many in flight remediations should happen at the same time. // // Remediation only happens on the MachineSet with the most current revision, while // older MachineSets (usually present during rollout operations) aren't allowed to remediate. @@ -258,7 +258,7 @@ type MachineDeploymentStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Selector is the same as the label selector but in the string format to avoid introspection + // selector is the same as the label selector but in the string format to avoid introspection // by clients. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional @@ -291,11 +291,11 @@ type MachineDeploymentStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas"` - // Phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). + // phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). // +optional Phase string `json:"phase,omitempty"` - // Conditions defines current service state of the MachineDeployment. + // conditions defines current service state of the MachineDeployment. // +optional Conditions Conditions `json:"conditions,omitempty"` diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/v1beta1/machinehealthcheck_types.go index e43d27854273..421601ee3d66 100644 --- a/api/v1beta1/machinehealthcheck_types.go +++ b/api/v1beta1/machinehealthcheck_types.go @@ -36,14 +36,14 @@ var ( // MachineHealthCheckSpec defines the desired state of MachineHealthCheck. type MachineHealthCheckSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` // Label selector to match machines whose health will be exercised Selector metav1.LabelSelector `json:"selector"` - // UnhealthyConditions contains a list of the conditions that determine + // unhealthyConditions contains a list of the conditions that determine // whether a node is considered unhealthy. The conditions are combined in a // logical OR, i.e. if any of the conditions is met, the node is unhealthy. // @@ -70,7 +70,7 @@ type MachineHealthCheckSpec struct { // +kubebuilder:validation:Pattern=^\[[0-9]+-[0-9]+\]$ UnhealthyRange *string `json:"unhealthyRange,omitempty"` - // NodeStartupTimeout allows to set the maximum time for MachineHealthCheck + // nodeStartupTimeout allows to set the maximum time for MachineHealthCheck // to consider a Machine unhealthy if a corresponding Node isn't associated // through a `Spec.ProviderID` field. // @@ -85,7 +85,7 @@ type MachineHealthCheckSpec struct { // +optional NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - // RemediationTemplate is a reference to a remediation template + // remediationTemplate is a reference to a remediation template // provided by an infrastructure provider. // // This field is completely optional, when filled, the MachineHealthCheck controller @@ -130,21 +130,21 @@ type MachineHealthCheckStatus struct { // +optional CurrentHealthy int32 `json:"currentHealthy"` - // RemediationsAllowed is the number of further remediations allowed by this machine health check before + // remediationsAllowed is the number of further remediations allowed by this machine health check before // maxUnhealthy short circuiting will be applied // +kubebuilder:validation:Minimum=0 // +optional RemediationsAllowed int32 `json:"remediationsAllowed"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Targets shows the current list of machines the machine health check is watching + // targets shows the current list of machines the machine health check is watching // +optional Targets []string `json:"targets,omitempty"` - // Conditions defines current service state of the MachineHealthCheck. + // conditions defines current service state of the MachineHealthCheck. // +optional Conditions Conditions `json:"conditions,omitempty"` diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go index e7dc0afd4767..deb01a63dada 100644 --- a/api/v1beta1/machineset_types.go +++ b/api/v1beta1/machineset_types.go @@ -39,11 +39,11 @@ const ( // MachineSetSpec defines the desired state of MachineSet. type MachineSetSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Replicas is the number of desired replicas. + // replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // // Defaults to: @@ -63,24 +63,24 @@ type MachineSetSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // MinReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. + // minReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. // Defaults to 0 (machine will be considered available as soon as the Node is ready) // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` - // DeletePolicy defines the policy used to identify nodes to delete when downscaling. + // deletePolicy defines the policy used to identify nodes to delete when downscaling. // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" // +kubebuilder:validation:Enum=Random;Newest;Oldest // +optional DeletePolicy string `json:"deletePolicy,omitempty"` - // Selector is a label query over machines that should match the replica count. + // selector is a label query over machines that should match the replica count. // Label keys and values that must match in order to be controlled by this MachineSet. // It must match the machine template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector metav1.LabelSelector `json:"selector"` - // Template is the object that describes the machine that will be created if + // template is the object that describes the machine that will be created if // insufficient replicas are detected. // Object references to custom resources are treated as templates. // +optional @@ -137,13 +137,13 @@ const ( // MachineSetStatus defines the observed state of MachineSet. type MachineSetStatus struct { - // Selector is the same as the label selector but in the string format to avoid introspection + // selector is the same as the label selector but in the string format to avoid introspection // by clients. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional Selector string `json:"selector,omitempty"` - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. // +optional Replicas int32 `json:"replicas"` @@ -159,7 +159,7 @@ type MachineSetStatus struct { // +optional AvailableReplicas int32 `json:"availableReplicas"` - // ObservedGeneration reflects the generation of the most recently observed MachineSet. + // observedGeneration reflects the generation of the most recently observed MachineSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -185,7 +185,7 @@ type MachineSetStatus struct { FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"` // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Conditions defines current service state of the MachineSet. + // conditions defines current service state of the MachineSet. // +optional Conditions Conditions `json:"conditions,omitempty"` diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go index cab637783e27..7c9ac3753301 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -35,18 +35,18 @@ import ( type InitConfiguration struct { metav1.TypeMeta `json:",inline"` - // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature // +optional BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible @@ -55,13 +55,13 @@ type InitConfiguration struct { // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // SkipPhases is a list of phases to skip during command execution. + // skipPhases is a list of phases to skip during command execution. // The list of phases can be obtained with the "kubeadm init --help" command. // This option takes effect only on Kubernetes >=1.22.0. // +optional SkipPhases []string `json:"skipPhases,omitempty"` - // Patches contains options related to applying patches to components deployed by kubeadm during + // patches contains options related to applying patches to components deployed by kubeadm during // "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22 // +optional Patches *Patches `json:"patches,omitempty"` @@ -73,22 +73,22 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` - // Etcd holds configuration for etcd. + // etcd holds configuration for etcd. // NB: This value defaults to a Local (stacked) etcd // +optional Etcd Etcd `json:"etcd,omitempty"` - // Networking holds configuration for the networking topology of the cluster. + // networking holds configuration for the networking topology of the cluster. // NB: This value defaults to the Cluster object spec.clusterNetwork. // +optional Networking Networking `json:"networking,omitempty"` - // KubernetesVersion is the target version of the control plane. + // kubernetesVersion is the target version of the control plane. // NB: This value defaults to the Machine object spec.version // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, @@ -103,28 +103,28 @@ type ClusterConfiguration struct { // +optional ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` - // APIServer contains extra settings for the API server control plane component + // apiServer contains extra settings for the API server control plane component // +optional APIServer APIServer `json:"apiServer,omitempty"` - // ControllerManager contains extra settings for the controller manager control plane component + // controllerManager contains extra settings for the controller manager control plane component // +optional ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` - // Scheduler contains extra settings for the scheduler control plane component + // scheduler contains extra settings for the scheduler control plane component // +optional Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` - // DNS defines the options for the DNS add-on installed in the cluster. + // dns defines the options for the DNS add-on installed in the cluster. // +optional DNS DNS `json:"dns,omitempty"` - // CertificatesDir specifies where to store or look for all required certificates. + // certificatesDir specifies where to store or look for all required certificates. // NB: if not provided, this will default to `/etc/kubernetes/pki` // +optional CertificatesDir string `json:"certificatesDir,omitempty"` - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // * If not set, the default registry of kubeadm will be used, i.e. // * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0 // * k8s.gcr.io (old registry): all older versions @@ -138,7 +138,7 @@ type ClusterConfiguration struct { // +optional ImageRepository string `json:"imageRepository,omitempty"` - // FeatureGates enabled by the user. + // featureGates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` @@ -149,16 +149,16 @@ type ClusterConfiguration struct { // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { - // ExtraArgs is an extra set of flags to pass to the control plane component. + // extraArgs is an extra set of flags to pass to the control plane component. // TODO: This is temporary and ideally we would like to switch all components to use ComponentConfig + ConfigMaps. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // extraVolumes is an extra set of host volumes, mounted to the control plane component. // +optional ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` - // ExtraEnvs is an extra set of environment variables to pass to the control plane component. + // extraEnvs is an extra set of environment variables to pass to the control plane component. // Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. // This option takes effect only on Kubernetes >=1.31.0. // +optional @@ -169,11 +169,11 @@ type ControlPlaneComponent struct { type APIServer struct { ControlPlaneComponent `json:",inline"` - // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // certSANs sets extra Subject Alternative Names for the API Server signing cert. // +optional CertSANs []string `json:"certSANs,omitempty"` - // TimeoutForControlPlane controls the timeout that we use for API server to appear + // timeoutForControlPlane controls the timeout that we use for API server to appear // +optional TimeoutForControlPlane *metav1.Duration `json:"timeoutForControlPlane,omitempty"` } @@ -187,12 +187,12 @@ type DNS struct { // ImageMeta allows to customize the image used for components that are not // originated from the Kubernetes/Kubernetes release process. type ImageMeta struct { - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // ImageTag allows to specify a tag for the image. + // imageTag allows to specify a tag for the image. // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. // +optional ImageTag string `json:"imageTag,omitempty"` @@ -210,18 +210,18 @@ type ImageMeta struct { type ClusterStatus struct { metav1.TypeMeta `json:",inline"` - // APIEndpoints currently available in the cluster, one for each control plane/api server instance. + // apiEndpoints currently available in the cluster, one for each control plane/api server instance. // The key of the map is the IP of the host's default interface APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"` } // APIEndpoint struct contains elements of API server instance deployed on a node. type APIEndpoint struct { - // AdvertiseAddress sets the IP address for the API server to advertise. + // advertiseAddress sets the IP address for the API server to advertise. // +optional AdvertiseAddress string `json:"advertiseAddress,omitempty"` - // BindPort sets the secure port for the API Server to bind to. + // bindPort sets the secure port for the API Server to bind to. // Defaults to 6443. // +optional BindPort int32 `json:"bindPort,omitempty"` @@ -231,33 +231,33 @@ type APIEndpoint struct { // Note: The NodeRegistrationOptions struct has to be kept in sync with the structs in MarshalJSON. type NodeRegistrationOptions struct { - // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. // This field is also used in the CommonName field of the kubelet's client certificate to the API server. // Defaults to the hostname of the node if not provided. // +optional Name string `json:"name,omitempty"` - // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use // +optional CRISocket string `json:"criSocket,omitempty"` - // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + // taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process // it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an // empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. // +optional Taints []corev1.Taint `json:"taints,omitempty"` - // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. // +optional KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"` - // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. + // ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. // +optional IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` - // ImagePullPolicy specifies the policy for image pulling + // imagePullPolicy specifies the policy for image pulling // during kubeadm "init" and "join" operations. The value of // this field must be one of "Always", "IfNotPresent" or // "Never". Defaults to "IfNotPresent". This can be used only @@ -266,7 +266,7 @@ type NodeRegistrationOptions struct { // +optional ImagePullPolicy string `json:"imagePullPolicy,omitempty"` - // ImagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. + // imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. // This option takes effect only on Kubernetes >=1.31.0. // Default: true (defaulted in kubeadm) // +optional @@ -326,43 +326,43 @@ func (n *NodeRegistrationOptions) MarshalJSON() ([]byte, error) { // Networking contains elements describing cluster's networking configuration. type Networking struct { - // ServiceSubnet is the subnet used by k8s services. + // serviceSubnet is the subnet used by k8s services. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or // to "10.96.0.0/12" if that's unset. // +optional ServiceSubnet string `json:"serviceSubnet,omitempty"` - // PodSubnet is the subnet used by pods. + // podSubnet is the subnet used by pods. // If unset, the API server will not allocate CIDR ranges for every node. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set // +optional PodSubnet string `json:"podSubnet,omitempty"` - // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local". // +optional DNSDomain string `json:"dnsDomain,omitempty"` } // BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. type BootstrapToken struct { - // Token is used for establishing bidirectional trust between nodes and control-planes. + // token is used for establishing bidirectional trust between nodes and control-planes. // Used for joining nodes in the cluster. Token *BootstrapTokenString `json:"token"` - // Description sets a human-friendly message why this token exists and what it's used + // description sets a human-friendly message why this token exists and what it's used // for, so other administrators can know its purpose. // +optional Description string `json:"description,omitempty"` - // TTL defines the time to live for this token. Defaults to 24h. + // ttl defines the time to live for this token. Defaults to 24h. // Expires and TTL are mutually exclusive. // +optional TTL *metav1.Duration `json:"ttl,omitempty"` - // Expires specifies the timestamp when this token expires. Defaults to being set + // expires specifies the timestamp when this token expires. Defaults to being set // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. // +optional Expires *metav1.Time `json:"expires,omitempty"` - // Usages describes the ways in which this token can be used. Can by default be used + // usages describes the ways in which this token can be used. Can by default be used // for establishing bidirectional trust, but that can be changed here. // +optional Usages []string `json:"usages,omitempty"` - // Groups specifies the extra groups that this token will authenticate as when/if + // groups specifies the extra groups that this token will authenticate as when/if // used for authentication // +optional Groups []string `json:"groups,omitempty"` @@ -371,12 +371,12 @@ type BootstrapToken struct { // Etcd contains elements describing Etcd configuration. type Etcd struct { - // Local provides configuration knobs for configuring the local etcd instance + // local provides configuration knobs for configuring the local etcd instance // Local and External are mutually exclusive // +optional Local *LocalEtcd `json:"local,omitempty"` - // External describes how to connect to an external etcd cluster + // external describes how to connect to an external etcd cluster // Local and External are mutually exclusive // +optional External *ExternalEtcd `json:"external,omitempty"` @@ -387,26 +387,26 @@ type LocalEtcd struct { // ImageMeta allows to customize the container used for etcd ImageMeta `json:",inline"` - // DataDir is the directory etcd will place its data. + // dataDir is the directory etcd will place its data. // Defaults to "/var/lib/etcd". // +optional DataDir string `json:"dataDir,omitempty"` - // ExtraArgs are extra arguments provided to the etcd binary + // extraArgs are extra arguments provided to the etcd binary // when run inside a static pod. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ExtraEnvs is an extra set of environment variables to pass to the control plane component. + // extraEnvs is an extra set of environment variables to pass to the control plane component. // Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. // This option takes effect only on Kubernetes >=1.31.0. // +optional ExtraEnvs []EnvVar `json:"extraEnvs,omitempty"` - // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert. // +optional ServerCertSANs []string `json:"serverCertSANs,omitempty"` - // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. // +optional PeerCertSANs []string `json:"peerCertSANs,omitempty"` } @@ -414,18 +414,18 @@ type LocalEtcd struct { // ExternalEtcd describes an external etcd cluster. // Kubeadm has no knowledge of where certificate files live and they must be supplied. type ExternalEtcd struct { - // Endpoints of etcd members. Required for ExternalEtcd. + // endpoints of etcd members. Required for ExternalEtcd. Endpoints []string `json:"endpoints"` - // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // caFile is an SSL Certificate Authority file used to secure etcd communication. // Required if using a TLS connection. CAFile string `json:"caFile"` - // CertFile is an SSL certification file used to secure etcd communication. + // certFile is an SSL certification file used to secure etcd communication. // Required if using a TLS connection. CertFile string `json:"certFile"` - // KeyFile is an SSL key file used to secure etcd communication. + // keyFile is an SSL key file used to secure etcd communication. // Required if using a TLS connection. KeyFile string `json:"keyFile"` } @@ -436,36 +436,36 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // CACertPath is the path to the SSL certificate authority used to + // caCertPath is the path to the SSL certificate authority used to // secure comunications between node and control-plane. // Defaults to "/etc/kubernetes/pki/ca.crt". // +optional // TODO: revisit when there is defaulting from k/k CACertPath string `json:"caCertPath,omitempty"` - // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // discovery specifies the options for the kubelet to use during the TLS Bootstrap process // +optional // TODO: revisit when there is defaulting from k/k Discovery Discovery `json:"discovery,omitempty"` - // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // controlPlane defines the additional control plane instance to be deployed on the joining node. // If nil, no additional control plane instance will be deployed. // +optional ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` - // SkipPhases is a list of phases to skip during command execution. + // skipPhases is a list of phases to skip during command execution. // The list of phases can be obtained with the "kubeadm init --help" command. // This option takes effect only on Kubernetes >=1.22.0. // +optional SkipPhases []string `json:"skipPhases,omitempty"` - // Patches contains options related to applying patches to components deployed by kubeadm during + // patches contains options related to applying patches to components deployed by kubeadm during // "kubeadm join". The minimum kubernetes version needed to support Patches is v1.22 // +optional Patches *Patches `json:"patches,omitempty"` @@ -473,45 +473,45 @@ type JoinConfiguration struct { // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` } // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. type Discovery struct { - // BootstrapToken is used to set the options for bootstrap token based discovery + // bootstrapToken is used to set the options for bootstrap token based discovery // BootstrapToken and File are mutually exclusive // +optional BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` - // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // file is used to specify a file or URL to a kubeconfig file from which to load cluster information // BootstrapToken and File are mutually exclusive // +optional File *FileDiscovery `json:"file,omitempty"` - // TLSBootstrapToken is a token used for TLS bootstrapping. + // tlsBootstrapToken is a token used for TLS bootstrapping. // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information // +optional TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty"` - // Timeout modifies the discovery timeout + // timeout modifies the discovery timeout // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` } // BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. type BootstrapTokenDiscovery struct { - // Token is a token used to validate cluster information + // token is a token used to validate cluster information // fetched from the control-plane. Token string `json:"token"` - // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // apiServerEndpoint is an IP or domain name to the API server from which info will be fetched. // +optional APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` - // CACertHashes specifies a set of public key pins to verify + // caCertHashes specifies a set of public key pins to verify // when token-based discovery is used. The root CA found during discovery // must match one of these values. Specifying an empty set disables root CA // pinning, which can be unsafe. Each hash is specified as ":", @@ -522,7 +522,7 @@ type BootstrapTokenDiscovery struct { // +optional CACertHashes []string `json:"caCertHashes,omitempty"` - // UnsafeSkipCAVerification allows token-based discovery + // unsafeSkipCAVerification allows token-based discovery // without CA verification via CACertHashes. This can weaken // the security of kubeadm since other nodes can impersonate the control-plane. // +optional @@ -531,10 +531,10 @@ type BootstrapTokenDiscovery struct { // FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. type FileDiscovery struct { - // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + // kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information KubeConfigPath string `json:"kubeConfigPath"` - // KubeConfig is used (optionally) to generate a KubeConfig based on the KubeadmConfig's information. + // kubeConfig is used (optionally) to generate a KubeConfig based on the KubeadmConfig's information. // The file is generated at the path specified in KubeConfigPath. // // Host address (server field) information is automatically populated based on the Cluster's ControlPlaneEndpoint. @@ -546,7 +546,7 @@ type FileDiscovery struct { // FileDiscoveryKubeConfig contains elements describing how to generate the kubeconfig for bootstrapping. type FileDiscoveryKubeConfig struct { - // Cluster contains information about how to communicate with the kubernetes cluster. + // cluster contains information about how to communicate with the kubernetes cluster. // // By default the following fields are automatically populated: // - Server with the Cluster's ControlPlaneEndpoint. @@ -554,7 +554,7 @@ type FileDiscoveryKubeConfig struct { // +optional Cluster *KubeConfigCluster `json:"cluster,omitempty"` - // User contains information that describes identity information. + // user contains information that describes identity information. // This is used to tell the kubernetes cluster who you are. User KubeConfigUser `json:"user"` } @@ -563,29 +563,29 @@ type FileDiscoveryKubeConfig struct { // // Adapted from clientcmdv1.Cluster. type KubeConfigCluster struct { - // Server is the address of the kubernetes cluster (https://hostname:port). + // server is the address of the kubernetes cluster (https://hostname:port). // // Defaults to https:// + Cluster.Spec.ControlPlaneEndpoint. // // +optional Server string `json:"server,omitempty"` - // TLSServerName is used to check server certificate. If TLSServerName is empty, the hostname used to contact the server is used. + // tlsServerName is used to check server certificate. If TLSServerName is empty, the hostname used to contact the server is used. // +optional TLSServerName string `json:"tlsServerName,omitempty"` - // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. + // insecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. // +optional InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"` - // CertificateAuthorityData contains PEM-encoded certificate authority certificates. + // certificateAuthorityData contains PEM-encoded certificate authority certificates. // // Defaults to the Cluster's CA certificate if empty. // // +optional CertificateAuthorityData []byte `json:"certificateAuthorityData,omitempty"` - // ProxyURL is the URL to the proxy to be used for all requests made by this + // proxyURL is the URL to the proxy to be used for all requests made by this // client. URLs with "http", "https", and "socks5" schemes are supported. If // this configuration is not provided or the empty string, the client // attempts to construct a proxy configuration from http_proxy and @@ -606,21 +606,21 @@ type KubeConfigCluster struct { // // Adapted from clientcmdv1.AuthInfo. type KubeConfigUser struct { - // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. + // authProvider specifies a custom authentication plugin for the kubernetes cluster. // +optional AuthProvider *KubeConfigAuthProvider `json:"authProvider,omitempty"` - // Exec specifies a custom exec-based authentication plugin for the kubernetes cluster. + // exec specifies a custom exec-based authentication plugin for the kubernetes cluster. // +optional Exec *KubeConfigAuthExec `json:"exec,omitempty"` } // KubeConfigAuthProvider holds the configuration for a specified auth provider. type KubeConfigAuthProvider struct { - // Name is the name of the authentication plugin. + // name is the name of the authentication plugin. Name string `json:"name"` - // Config holds the parameters for the authentication plugin. + // config holds the parameters for the authentication plugin. // +optional Config map[string]string `json:"config,omitempty"` } @@ -631,14 +631,14 @@ type KubeConfigAuthProvider struct { // See the client.authentication.k8s.io API group for specifications of the exact input // and output format. type KubeConfigAuthExec struct { - // Command to execute. + // command to execute. Command string `json:"command"` // Arguments to pass to the command when executing it. // +optional Args []string `json:"args,omitempty"` - // Env defines additional environment variables to expose to the process. These + // env defines additional environment variables to expose to the process. These // are unioned with the host's environment, as well as variables client-go uses // to pass argument to the plugin. // +optional @@ -650,7 +650,7 @@ type KubeConfigAuthExec struct { // +optional APIVersion string `json:"apiVersion,omitempty"` - // ProvideClusterInfo determines whether or not to provide cluster information, + // provideClusterInfo determines whether or not to provide cluster information, // which could potentially contain very large CA data, to this exec plugin as a // part of the KUBERNETES_EXEC_INFO environment variable. By default, it is set // to false. Package k8s.io/client-go/tools/auth/exec provides helper methods for @@ -669,17 +669,17 @@ type KubeConfigAuthExecEnv struct { // HostPathMount contains elements describing volumes that are mounted from the // host. type HostPathMount struct { - // Name of the volume inside the pod template. + // name of the volume inside the pod template. Name string `json:"name"` - // HostPath is the path in the host that will be mounted inside + // hostPath is the path in the host that will be mounted inside // the pod. HostPath string `json:"hostPath"` - // MountPath is the path inside the pod where hostPath will be mounted. + // mountPath is the path inside the pod where hostPath will be mounted. MountPath string `json:"mountPath"` - // ReadOnly controls write access to the volume + // readOnly controls write access to the volume // +optional ReadOnly bool `json:"readOnly,omitempty"` - // PathType is the type of the HostPath. + // pathType is the type of the HostPath. // +optional PathType corev1.HostPathType `json:"pathType,omitempty"` } @@ -743,7 +743,7 @@ func NewBootstrapTokenString(token string) (*BootstrapTokenString, error) { // Patches contains options related to applying patches to components deployed by kubeadm. type Patches struct { - // Directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + // directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". // For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of // "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one // of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go index fae7c85c7b5e..40765eb3c550 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -51,56 +51,56 @@ var ( // KubeadmConfigSpec defines the desired state of KubeadmConfig. // Either ClusterConfiguration and InitConfiguration should be defined or the JoinConfiguration should be defined. type KubeadmConfigSpec struct { - // ClusterConfiguration along with InitConfiguration are the configurations necessary for the init command + // clusterConfiguration along with InitConfiguration are the configurations necessary for the init command // +optional ClusterConfiguration *ClusterConfiguration `json:"clusterConfiguration,omitempty"` - // InitConfiguration along with ClusterConfiguration are the configurations necessary for the init command + // initConfiguration along with ClusterConfiguration are the configurations necessary for the init command // +optional InitConfiguration *InitConfiguration `json:"initConfiguration,omitempty"` - // JoinConfiguration is the kubeadm configuration for the join command + // joinConfiguration is the kubeadm configuration for the join command // +optional JoinConfiguration *JoinConfiguration `json:"joinConfiguration,omitempty"` - // Files specifies extra files to be passed to user_data upon creation. + // files specifies extra files to be passed to user_data upon creation. // +optional Files []File `json:"files,omitempty"` - // DiskSetup specifies options for the creation of partition tables and file systems on devices. + // diskSetup specifies options for the creation of partition tables and file systems on devices. // +optional DiskSetup *DiskSetup `json:"diskSetup,omitempty"` - // Mounts specifies a list of mount points to be setup. + // mounts specifies a list of mount points to be setup. // +optional Mounts []MountPoints `json:"mounts,omitempty"` - // PreKubeadmCommands specifies extra commands to run before kubeadm runs + // preKubeadmCommands specifies extra commands to run before kubeadm runs // +optional PreKubeadmCommands []string `json:"preKubeadmCommands,omitempty"` - // PostKubeadmCommands specifies extra commands to run after kubeadm runs + // postKubeadmCommands specifies extra commands to run after kubeadm runs // +optional PostKubeadmCommands []string `json:"postKubeadmCommands,omitempty"` - // Users specifies extra users to add + // users specifies extra users to add // +optional Users []User `json:"users,omitempty"` - // NTP specifies NTP configuration + // ntp specifies NTP configuration // +optional NTP *NTP `json:"ntp,omitempty"` - // Format specifies the output format of the bootstrap data + // format specifies the output format of the bootstrap data // +optional Format Format `json:"format,omitempty"` - // Verbosity is the number for the kubeadm log level verbosity. + // verbosity is the number for the kubeadm log level verbosity. // It overrides the `--v` flag in kubeadm commands. // +optional Verbosity *int32 `json:"verbosity,omitempty"` - // UseExperimentalRetryJoin replaces a basic kubeadm command with a shell + // useExperimentalRetryJoin replaces a basic kubeadm command with a shell // script with retries for joins. // // This is meant to be an experimental temporary workaround on some environments @@ -116,7 +116,7 @@ type KubeadmConfigSpec struct { // When removing also remove from staticcheck exclude-rules for SA1019 in golangci.yml UseExperimentalRetryJoin bool `json:"useExperimentalRetryJoin,omitempty"` - // Ignition contains Ignition specific configuration. + // ignition contains Ignition specific configuration. // +optional Ignition *IgnitionSpec `json:"ignition,omitempty"` } @@ -395,7 +395,7 @@ func (c *KubeadmConfigSpec) validateIgnition(pathPrefix *field.Path) field.Error // IgnitionSpec contains Ignition specific configuration. type IgnitionSpec struct { - // ContainerLinuxConfig contains CLC specific configuration. + // containerLinuxConfig contains CLC specific configuration. // +optional ContainerLinuxConfig *ContainerLinuxConfig `json:"containerLinuxConfig,omitempty"` } @@ -404,41 +404,41 @@ type IgnitionSpec struct { // // We use a structured type here to allow adding additional fields, for example 'version'. type ContainerLinuxConfig struct { - // AdditionalConfig contains additional configuration to be merged with the Ignition + // additionalConfig contains additional configuration to be merged with the Ignition // configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging // // The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/ // +optional AdditionalConfig string `json:"additionalConfig,omitempty"` - // Strict controls if AdditionalConfig should be strictly parsed. If so, warnings are treated as errors. + // strict controls if AdditionalConfig should be strictly parsed. If so, warnings are treated as errors. // +optional Strict bool `json:"strict,omitempty"` } // KubeadmConfigStatus defines the observed state of KubeadmConfig. type KubeadmConfigStatus struct { - // Ready indicates the BootstrapData field is ready to be consumed + // ready indicates the BootstrapData field is ready to be consumed // +optional Ready bool `json:"ready"` - // DataSecretName is the name of the secret that stores the bootstrap data script. + // dataSecretName is the name of the secret that stores the bootstrap data script. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` - // FailureReason will be set on non-retryable errors + // failureReason will be set on non-retryable errors // +optional FailureReason string `json:"failureReason,omitempty"` - // FailureMessage will be set on non-retryable errors + // failureMessage will be set on non-retryable errors // +optional FailureMessage string `json:"failureMessage,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the KubeadmConfig. + // conditions defines current service state of the KubeadmConfig. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` @@ -529,30 +529,30 @@ const ( // File defines the input for generating write_files in cloud-init. type File struct { - // Path specifies the full path on disk where to store the file. + // path specifies the full path on disk where to store the file. Path string `json:"path"` - // Owner specifies the ownership of the file, e.g. "root:root". + // owner specifies the ownership of the file, e.g. "root:root". // +optional Owner string `json:"owner,omitempty"` - // Permissions specifies the permissions to assign to the file, e.g. "0640". + // permissions specifies the permissions to assign to the file, e.g. "0640". // +optional Permissions string `json:"permissions,omitempty"` - // Encoding specifies the encoding of the file contents. + // encoding specifies the encoding of the file contents. // +optional Encoding Encoding `json:"encoding,omitempty"` - // Append specifies whether to append Content to existing file if Path exists. + // append specifies whether to append Content to existing file if Path exists. // +optional Append bool `json:"append,omitempty"` - // Content is the actual content of the file. + // content is the actual content of the file. // +optional Content string `json:"content,omitempty"` - // ContentFrom is a referenced source of content to populate the file. + // contentFrom is a referenced source of content to populate the file. // +optional ContentFrom *FileSource `json:"contentFrom,omitempty"` } @@ -561,7 +561,7 @@ type File struct { // Only one field may be populated in any given instance. Developers adding new // sources of data for target systems should add them here. type FileSource struct { - // Secret represents a secret that should populate this file. + // secret represents a secret that should populate this file. Secret SecretFileSource `json:"secret"` } @@ -570,10 +570,10 @@ type FileSource struct { // The contents of the target Secret's Data field will be presented // as files using the keys in the Data field as the file names. type SecretFileSource struct { - // Name of the secret in the KubeadmBootstrapConfig's namespace to use. + // name of the secret in the KubeadmBootstrapConfig's namespace to use. Name string `json:"name"` - // Key is the key in the secret's data map for this value. + // key is the key in the secret's data map for this value. Key string `json:"key"` } @@ -581,7 +581,7 @@ type SecretFileSource struct { // Only one field may be populated in any given instance. Developers adding new // sources of data for target systems should add them here. type PasswdSource struct { - // Secret represents a secret that should populate this password. + // secret represents a secret that should populate this password. Secret SecretPasswdSource `json:"secret"` } @@ -590,98 +590,98 @@ type PasswdSource struct { // The contents of the target Secret's Data field will be presented // as passwd using the keys in the Data field as the file names. type SecretPasswdSource struct { - // Name of the secret in the KubeadmBootstrapConfig's namespace to use. + // name of the secret in the KubeadmBootstrapConfig's namespace to use. Name string `json:"name"` - // Key is the key in the secret's data map for this value. + // key is the key in the secret's data map for this value. Key string `json:"key"` } // User defines the input for a generated user in cloud-init. type User struct { - // Name specifies the user name + // name specifies the user name Name string `json:"name"` - // Gecos specifies the gecos to use for the user + // gecos specifies the gecos to use for the user // +optional Gecos *string `json:"gecos,omitempty"` - // Groups specifies the additional groups for the user + // groups specifies the additional groups for the user // +optional Groups *string `json:"groups,omitempty"` - // HomeDir specifies the home directory to use for the user + // homeDir specifies the home directory to use for the user // +optional HomeDir *string `json:"homeDir,omitempty"` - // Inactive specifies whether to mark the user as inactive + // inactive specifies whether to mark the user as inactive // +optional Inactive *bool `json:"inactive,omitempty"` - // Shell specifies the user's shell + // shell specifies the user's shell // +optional Shell *string `json:"shell,omitempty"` - // Passwd specifies a hashed password for the user + // passwd specifies a hashed password for the user // +optional Passwd *string `json:"passwd,omitempty"` - // PasswdFrom is a referenced source of passwd to populate the passwd. + // passwdFrom is a referenced source of passwd to populate the passwd. // +optional PasswdFrom *PasswdSource `json:"passwdFrom,omitempty"` - // PrimaryGroup specifies the primary group for the user + // primaryGroup specifies the primary group for the user // +optional PrimaryGroup *string `json:"primaryGroup,omitempty"` - // LockPassword specifies if password login should be disabled + // lockPassword specifies if password login should be disabled // +optional LockPassword *bool `json:"lockPassword,omitempty"` - // Sudo specifies a sudo role for the user + // sudo specifies a sudo role for the user // +optional Sudo *string `json:"sudo,omitempty"` - // SSHAuthorizedKeys specifies a list of ssh authorized keys for the user + // sshAuthorizedKeys specifies a list of ssh authorized keys for the user // +optional SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` } // NTP defines input for generated ntp in cloud-init. type NTP struct { - // Servers specifies which NTP servers to use + // servers specifies which NTP servers to use // +optional Servers []string `json:"servers,omitempty"` - // Enabled specifies whether NTP should be enabled + // enabled specifies whether NTP should be enabled // +optional Enabled *bool `json:"enabled,omitempty"` } // DiskSetup defines input for generated disk_setup and fs_setup in cloud-init. type DiskSetup struct { - // Partitions specifies the list of the partitions to setup. + // partitions specifies the list of the partitions to setup. // +optional Partitions []Partition `json:"partitions,omitempty"` - // Filesystems specifies the list of file systems to setup. + // filesystems specifies the list of file systems to setup. // +optional Filesystems []Filesystem `json:"filesystems,omitempty"` } // Partition defines how to create and layout a partition. type Partition struct { - // Device is the name of the device. + // device is the name of the device. Device string `json:"device"` - // Layout specifies the device layout. + // layout specifies the device layout. // If it is true, a single partition will be created for the entire device. // When layout is false, it means don't partition or ignore existing partitioning. Layout bool `json:"layout"` - // Overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. + // overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. // Use with caution. Default is 'false'. // +optional Overwrite *bool `json:"overwrite,omitempty"` - // TableType specifies the tupe of partition table. The following are supported: + // tableType specifies the tupe of partition table. The following are supported: // 'mbr': default and setups a MS-DOS partition table // 'gpt': setups a GPT partition table // +optional @@ -690,24 +690,24 @@ type Partition struct { // Filesystem defines the file systems to be created. type Filesystem struct { - // Device specifies the device name + // device specifies the device name Device string `json:"device"` - // Filesystem specifies the file system type. + // filesystem specifies the file system type. Filesystem string `json:"filesystem"` - // Label specifies the file system label to be used. If set to None, no label is used. + // label specifies the file system label to be used. If set to None, no label is used. Label string `json:"label"` - // Partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. + // partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. // +optional Partition *string `json:"partition,omitempty"` - // Overwrite defines whether or not to overwrite any existing filesystem. + // overwrite defines whether or not to overwrite any existing filesystem. // If true, any pre-existing file system will be destroyed. Use with Caution. // +optional Overwrite *bool `json:"overwrite,omitempty"` - // ReplaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . + // replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . // NOTE: unless you define a label, this requires the use of the 'any' partition directive. // +optional ReplaceFS *string `json:"replaceFS,omitempty"` - // ExtraOpts defined extra options to add to the command for creating the file system. + // extraOpts defined extra options to add to the command for creating the file system. // +optional ExtraOpts []string `json:"extraOpts,omitempty"` } diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/types.go b/bootstrap/kubeadm/types/upstreamv1beta1/types.go index 1b69e3dd783c..fe575f31b8fb 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta1/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/types.go @@ -28,18 +28,18 @@ import ( type InitConfiguration struct { metav1.TypeMeta `json:",inline"` - // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature // +optional BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible @@ -55,22 +55,22 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` - // Etcd holds configuration for etcd. + // etcd holds configuration for etcd. // NB: This value defaults to a Local (stacked) etcd // +optional Etcd Etcd `json:"etcd,omitempty"` - // Networking holds configuration for the networking topology of the cluster. + // networking holds configuration for the networking topology of the cluster. // NB: This value defaults to the Cluster object spec.clusterNetwork. // +optional Networking Networking `json:"networking,omitempty"` - // KubernetesVersion is the target version of the control plane. + // kubernetesVersion is the target version of the control plane. // NB: This value defaults to the Machine object spec.version // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, @@ -85,39 +85,39 @@ type ClusterConfiguration struct { // +optional ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` - // APIServer contains extra settings for the API server control plane component + // apiServer contains extra settings for the API server control plane component // +optional APIServer APIServer `json:"apiServer,omitempty"` - // ControllerManager contains extra settings for the controller manager control plane component + // controllerManager contains extra settings for the controller manager control plane component // +optional ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` - // Scheduler contains extra settings for the scheduler control plane component + // scheduler contains extra settings for the scheduler control plane component // +optional Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` - // DNS defines the options for the DNS add-on installed in the cluster. + // dns defines the options for the DNS add-on installed in the cluster. // +optional DNS DNS `json:"dns,omitempty"` - // CertificatesDir specifies where to store or look for all required certificates. + // certificatesDir specifies where to store or look for all required certificates. // NB: if not provided, this will default to `/etc/kubernetes/pki` // +optional CertificatesDir string `json:"certificatesDir,omitempty"` - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io` // will be used for all the other images. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // UseHyperKubeImage controls if hyperkube should be used for Kubernetes components instead of their respective separate images + // useHyperKubeImage controls if hyperkube should be used for Kubernetes components instead of their respective separate images // +optional UseHyperKubeImage bool `json:"useHyperKubeImage,omitempty"` - // FeatureGates enabled by the user. + // featureGates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` @@ -128,11 +128,11 @@ type ClusterConfiguration struct { // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { - // ExtraArgs is an extra set of flags to pass to the control plane component. + // extraArgs is an extra set of flags to pass to the control plane component. // TODO: This is temporary and ideally we would like to switch all components to use ComponentConfig + ConfigMaps. ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // extraVolumes is an extra set of host volumes, mounted to the control plane component. ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` } @@ -140,10 +140,10 @@ type ControlPlaneComponent struct { type APIServer struct { ControlPlaneComponent `json:",inline"` - // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // certSANs sets extra Subject Alternative Names for the API Server signing cert. CertSANs []string `json:"certSANs,omitempty"` - // TimeoutForControlPlane controls the timeout that we use for API server to appear + // timeoutForControlPlane controls the timeout that we use for API server to appear TimeoutForControlPlane *metav1.Duration `json:"timeoutForControlPlane,omitempty"` } @@ -160,7 +160,7 @@ const ( // DNS defines the DNS addon that should be used in the cluster. type DNS struct { - // Type defines the DNS add-on to be used + // type defines the DNS add-on to be used // +optional Type DNSAddOnType `json:"type,omitempty"` @@ -171,11 +171,11 @@ type DNS struct { // ImageMeta allows to customize the image used for components that are not // originated from the Kubernetes/Kubernetes release process. type ImageMeta struct { - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ImageRepository string `json:"imageRepository,omitempty"` - // ImageTag allows to specify a tag for the image. + // imageTag allows to specify a tag for the image. // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ImageTag string `json:"imageTag,omitempty"` @@ -189,17 +189,17 @@ type ImageMeta struct { type ClusterStatus struct { metav1.TypeMeta `json:",inline"` - // APIEndpoints currently available in the cluster, one for each control plane/api server instance. + // apiEndpoints currently available in the cluster, one for each control plane/api server instance. // The key of the map is the IP of the host's default interface APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"` } // APIEndpoint struct contains elements of API server instance deployed on a node. type APIEndpoint struct { - // AdvertiseAddress sets the IP address for the API server to advertise. + // advertiseAddress sets the IP address for the API server to advertise. AdvertiseAddress string `json:"advertiseAddress"` - // BindPort sets the secure port for the API Server to bind to. + // bindPort sets the secure port for the API Server to bind to. // Defaults to 6443. BindPort int32 `json:"bindPort"` } @@ -207,23 +207,23 @@ type APIEndpoint struct { // NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join". type NodeRegistrationOptions struct { - // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. // This field is also used in the CommonName field of the kubelet's client certificate to the API server. // Defaults to the hostname of the node if not provided. // +optional Name string `json:"name,omitempty"` - // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use // +optional CRISocket string `json:"criSocket,omitempty"` - // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + // taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process // it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an // empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. // +optional Taints []corev1.Taint `json:"taints,omitempty"` - // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. // +optional @@ -232,39 +232,39 @@ type NodeRegistrationOptions struct { // Networking contains elements describing cluster's networking configuration. type Networking struct { - // ServiceSubnet is the subnet used by k8s services. + // serviceSubnet is the subnet used by k8s services. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or // to "10.96.0.0/12" if that's unset. // +optional ServiceSubnet string `json:"serviceSubnet,omitempty"` - // PodSubnet is the subnet used by pods. + // podSubnet is the subnet used by pods. // If unset, the API server will not allocate CIDR ranges for every node. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set // +optional PodSubnet string `json:"podSubnet,omitempty"` - // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local". // +optional DNSDomain string `json:"dnsDomain,omitempty"` } // BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. type BootstrapToken struct { - // Token is used for establishing bidirectional trust between nodes and control-planes. + // token is used for establishing bidirectional trust between nodes and control-planes. // Used for joining nodes in the cluster. Token *BootstrapTokenString `json:"token"` - // Description sets a human-friendly message why this token exists and what it's used + // description sets a human-friendly message why this token exists and what it's used // for, so other administrators can know its purpose. Description string `json:"description,omitempty"` - // TTL defines the time to live for this token. Defaults to 24h. + // ttl defines the time to live for this token. Defaults to 24h. // Expires and TTL are mutually exclusive. TTL *metav1.Duration `json:"ttl,omitempty"` - // Expires specifies the timestamp when this token expires. Defaults to being set + // expires specifies the timestamp when this token expires. Defaults to being set // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. Expires *metav1.Time `json:"expires,omitempty"` - // Usages describes the ways in which this token can be used. Can by default be used + // usages describes the ways in which this token can be used. Can by default be used // for establishing bidirectional trust, but that can be changed here. Usages []string `json:"usages,omitempty"` - // Groups specifies the extra groups that this token will authenticate as when/if + // groups specifies the extra groups that this token will authenticate as when/if // used for authentication Groups []string `json:"groups,omitempty"` } @@ -272,11 +272,11 @@ type BootstrapToken struct { // Etcd contains elements describing Etcd configuration. type Etcd struct { - // Local provides configuration knobs for configuring the local etcd instance + // local provides configuration knobs for configuring the local etcd instance // Local and External are mutually exclusive Local *LocalEtcd `json:"local,omitempty"` - // External describes how to connect to an external etcd cluster + // external describes how to connect to an external etcd cluster // Local and External are mutually exclusive External *ExternalEtcd `json:"external,omitempty"` } @@ -286,36 +286,36 @@ type LocalEtcd struct { // ImageMeta allows to customize the container used for etcd ImageMeta `json:",inline"` - // DataDir is the directory etcd will place its data. + // dataDir is the directory etcd will place its data. // Defaults to "/var/lib/etcd". // +optional DataDir string `json:"dataDir,omitempty"` - // ExtraArgs are extra arguments provided to the etcd binary + // extraArgs are extra arguments provided to the etcd binary // when run inside a static pod. ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert. ServerCertSANs []string `json:"serverCertSANs,omitempty"` - // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. PeerCertSANs []string `json:"peerCertSANs,omitempty"` } // ExternalEtcd describes an external etcd cluster. // Kubeadm has no knowledge of where certificate files live and they must be supplied. type ExternalEtcd struct { - // Endpoints of etcd members. Required for ExternalEtcd. + // endpoints of etcd members. Required for ExternalEtcd. Endpoints []string `json:"endpoints"` - // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // caFile is an SSL Certificate Authority file used to secure etcd communication. // Required if using a TLS connection. CAFile string `json:"caFile"` - // CertFile is an SSL certification file used to secure etcd communication. + // certFile is an SSL certification file used to secure etcd communication. // Required if using a TLS connection. CertFile string `json:"certFile"` - // KeyFile is an SSL key file used to secure etcd communication. + // keyFile is an SSL key file used to secure etcd communication. // Required if using a TLS connection. KeyFile string `json:"keyFile"` } @@ -326,25 +326,25 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // CACertPath is the path to the SSL certificate authority used to + // caCertPath is the path to the SSL certificate authority used to // secure comunications between node and control-plane. // Defaults to "/etc/kubernetes/pki/ca.crt". // +optional // TODO: revisit when there is defaulting from k/k CACertPath string `json:"caCertPath,omitempty"` - // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // discovery specifies the options for the kubelet to use during the TLS Bootstrap process // +optional // TODO: revisit when there is defaulting from k/k Discovery Discovery `json:"discovery,omitempty"` - // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // controlPlane defines the additional control plane instance to be deployed on the joining node. // If nil, no additional control plane instance will be deployed. // +optional ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` @@ -352,41 +352,41 @@ type JoinConfiguration struct { // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` } // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. type Discovery struct { - // BootstrapToken is used to set the options for bootstrap token based discovery + // bootstrapToken is used to set the options for bootstrap token based discovery // BootstrapToken and File are mutually exclusive BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` - // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // file is used to specify a file or URL to a kubeconfig file from which to load cluster information // BootstrapToken and File are mutually exclusive File *FileDiscovery `json:"file,omitempty"` - // TLSBootstrapToken is a token used for TLS bootstrapping. + // tlsBootstrapToken is a token used for TLS bootstrapping. // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information // +optional // TODO: revisit when there is defaulting from k/k TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty"` - // Timeout modifies the discovery timeout + // timeout modifies the discovery timeout Timeout *metav1.Duration `json:"timeout,omitempty"` } // BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. type BootstrapTokenDiscovery struct { - // Token is a token used to validate cluster information + // token is a token used to validate cluster information // fetched from the control-plane. Token string `json:"token"` - // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // apiServerEndpoint is an IP or domain name to the API server from which info will be fetched. APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` - // CACertHashes specifies a set of public key pins to verify + // caCertHashes specifies a set of public key pins to verify // when token-based discovery is used. The root CA found during discovery // must match one of these values. Specifying an empty set disables root CA // pinning, which can be unsafe. Each hash is specified as ":", @@ -396,7 +396,7 @@ type BootstrapTokenDiscovery struct { // openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex CACertHashes []string `json:"caCertHashes,omitempty"` - // UnsafeSkipCAVerification allows token-based discovery + // unsafeSkipCAVerification allows token-based discovery // without CA verification via CACertHashes. This can weaken // the security of kubeadm since other nodes can impersonate the control-plane. UnsafeSkipCAVerification bool `json:"unsafeSkipCAVerification"` @@ -404,22 +404,22 @@ type BootstrapTokenDiscovery struct { // FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. type FileDiscovery struct { - // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + // kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information KubeConfigPath string `json:"kubeConfigPath"` } // HostPathMount contains elements describing volumes that are mounted from the // host. type HostPathMount struct { - // Name of the volume inside the pod template. + // name of the volume inside the pod template. Name string `json:"name"` - // HostPath is the path in the host that will be mounted inside + // hostPath is the path in the host that will be mounted inside // the pod. HostPath string `json:"hostPath"` - // MountPath is the path inside the pod where hostPath will be mounted. + // mountPath is the path inside the pod where hostPath will be mounted. MountPath string `json:"mountPath"` - // ReadOnly controls write access to the volume + // readOnly controls write access to the volume ReadOnly bool `json:"readOnly,omitempty"` - // PathType is the type of the HostPath. + // pathType is the type of the HostPath. PathType corev1.HostPathType `json:"pathType,omitempty"` } diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/types.go b/bootstrap/kubeadm/types/upstreamv1beta2/types.go index 94204824394c..a98b443c3f42 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta2/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/types.go @@ -32,18 +32,18 @@ type InitConfiguration struct { // After that, the information in the fields IS NOT uploaded to the `kubeadm-config` ConfigMap // that is used by `kubeadm upgrade` for instance. These fields must be omitempty. - // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature // +optional BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible @@ -52,7 +52,7 @@ type InitConfiguration struct { // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in + // certificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in // a secret in the cluster during the uploadcerts init phase. // +optional CertificateKey string `json:"certificateKey,omitempty"` @@ -64,22 +64,22 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` - // Etcd holds configuration for etcd. + // etcd holds configuration for etcd. // NB: This value defaults to a Local (stacked) etcd // +optional Etcd Etcd `json:"etcd,omitempty"` - // Networking holds configuration for the networking topology of the cluster. + // networking holds configuration for the networking topology of the cluster. // NB: This value defaults to the Cluster object spec.clusterNetwork. // +optional Networking Networking `json:"networking,omitempty"` - // KubernetesVersion is the target version of the control plane. + // kubernetesVersion is the target version of the control plane. // NB: This value defaults to the Machine object spec.version // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, @@ -94,42 +94,42 @@ type ClusterConfiguration struct { // +optional ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` - // APIServer contains extra settings for the API server control plane component + // apiServer contains extra settings for the API server control plane component // +optional APIServer APIServer `json:"apiServer,omitempty"` - // ControllerManager contains extra settings for the controller manager control plane component + // controllerManager contains extra settings for the controller manager control plane component // +optional ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` - // Scheduler contains extra settings for the scheduler control plane component + // scheduler contains extra settings for the scheduler control plane component // +optional Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` - // DNS defines the options for the DNS add-on installed in the cluster. + // dns defines the options for the DNS add-on installed in the cluster. // +optional DNS DNS `json:"dns,omitempty"` - // CertificatesDir specifies where to store or look for all required certificates. + // certificatesDir specifies where to store or look for all required certificates. // NB: if not provided, this will default to `/etc/kubernetes/pki` // +optional CertificatesDir string `json:"certificatesDir,omitempty"` - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // If empty, `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/`) // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `registry.k8s.io` // will be used for all the other images. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // UseHyperKubeImage controls if hyperkube should be used for Kubernetes components instead of their respective separate images + // useHyperKubeImage controls if hyperkube should be used for Kubernetes components instead of their respective separate images // // Deprecated: As hyperkube is itself deprecated, this fields is too. It will be removed in future kubeadm config versions, kubeadm // will print multiple warnings when set to true, and at some point it may become ignored. // +optional UseHyperKubeImage bool `json:"useHyperKubeImage,omitempty"` - // FeatureGates enabled by the user. + // featureGates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` @@ -140,13 +140,13 @@ type ClusterConfiguration struct { // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { - // ExtraArgs is an extra set of flags to pass to the control plane component. + // extraArgs is an extra set of flags to pass to the control plane component. // A key in this map is the flag name as it appears on the // command line except without leading dash(es). // TODO: This is temporary and ideally we would like to switch all components to use ComponentConfig + ConfigMaps. ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // extraVolumes is an extra set of host volumes, mounted to the control plane component. ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` } @@ -154,10 +154,10 @@ type ControlPlaneComponent struct { type APIServer struct { ControlPlaneComponent `json:",inline"` - // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // certSANs sets extra Subject Alternative Names for the API Server signing cert. CertSANs []string `json:"certSANs,omitempty"` - // TimeoutForControlPlane controls the timeout that we use for API server to appear + // timeoutForControlPlane controls the timeout that we use for API server to appear TimeoutForControlPlane *metav1.Duration `json:"timeoutForControlPlane,omitempty"` } @@ -174,7 +174,7 @@ const ( // DNS defines the DNS addon that should be used in the cluster. type DNS struct { - // Type defines the DNS add-on to be used + // type defines the DNS add-on to be used // +optional Type DNSAddOnType `json:"type,omitempty"` @@ -185,11 +185,11 @@ type DNS struct { // ImageMeta allows to customize the image used for components that are not // originated from the Kubernetes/Kubernetes release process. type ImageMeta struct { - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. ImageRepository string `json:"imageRepository,omitempty"` - // ImageTag allows to specify a tag for the image. + // imageTag allows to specify a tag for the image. // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. ImageTag string `json:"imageTag,omitempty"` @@ -203,17 +203,17 @@ type ImageMeta struct { type ClusterStatus struct { metav1.TypeMeta `json:",inline"` - // APIEndpoints currently available in the cluster, one for each control plane/api server instance. + // apiEndpoints currently available in the cluster, one for each control plane/api server instance. // The key of the map is the IP of the host's default interface APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"` } // APIEndpoint struct contains elements of API server instance deployed on a node. type APIEndpoint struct { - // AdvertiseAddress sets the IP address for the API server to advertise. + // advertiseAddress sets the IP address for the API server to advertise. AdvertiseAddress string `json:"advertiseAddress,omitempty"` - // BindPort sets the secure port for the API Server to bind to. + // bindPort sets the secure port for the API Server to bind to. // Defaults to 6443. BindPort int32 `json:"bindPort,omitempty"` } @@ -221,23 +221,23 @@ type APIEndpoint struct { // NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join". type NodeRegistrationOptions struct { - // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. // This field is also used in the CommonName field of the kubelet's client certificate to the API server. // Defaults to the hostname of the node if not provided. // +optional Name string `json:"name,omitempty"` - // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use // +optional CRISocket string `json:"criSocket,omitempty"` - // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + // taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process // it will be defaulted to []corev1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an // empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. // +optional Taints []corev1.Taint `json:"taints,omitempty"` - // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. // A key in this map is the flag name as it appears on the @@ -245,46 +245,46 @@ type NodeRegistrationOptions struct { // +optional KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"` - // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. + // ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. // +optional IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` } // Networking contains elements describing cluster's networking configuration. type Networking struct { - // ServiceSubnet is the subnet used by k8s services. + // serviceSubnet is the subnet used by k8s services. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or // to "10.96.0.0/12" if that's unset. // +optional ServiceSubnet string `json:"serviceSubnet,omitempty"` - // PodSubnet is the subnet used by pods. + // podSubnet is the subnet used by pods. // If unset, the API server will not allocate CIDR ranges for every node. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set // +optional PodSubnet string `json:"podSubnet,omitempty"` - // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local". // +optional DNSDomain string `json:"dnsDomain,omitempty"` } // BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. type BootstrapToken struct { - // Token is used for establishing bidirectional trust between nodes and control-planes. + // token is used for establishing bidirectional trust between nodes and control-planes. // Used for joining nodes in the cluster. Token *BootstrapTokenString `json:"token"` - // Description sets a human-friendly message why this token exists and what it's used + // description sets a human-friendly message why this token exists and what it's used // for, so other administrators can know its purpose. Description string `json:"description,omitempty"` - // TTL defines the time to live for this token. Defaults to 24h. + // ttl defines the time to live for this token. Defaults to 24h. // Expires and TTL are mutually exclusive. TTL *metav1.Duration `json:"ttl,omitempty"` - // Expires specifies the timestamp when this token expires. Defaults to being set + // expires specifies the timestamp when this token expires. Defaults to being set // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. Expires *metav1.Time `json:"expires,omitempty"` - // Usages describes the ways in which this token can be used. Can by default be used + // usages describes the ways in which this token can be used. Can by default be used // for establishing bidirectional trust, but that can be changed here. Usages []string `json:"usages,omitempty"` - // Groups specifies the extra groups that this token will authenticate as when/if + // groups specifies the extra groups that this token will authenticate as when/if // used for authentication Groups []string `json:"groups,omitempty"` } @@ -292,11 +292,11 @@ type BootstrapToken struct { // Etcd contains elements describing Etcd configuration. type Etcd struct { - // Local provides configuration knobs for configuring the local etcd instance + // local provides configuration knobs for configuring the local etcd instance // Local and External are mutually exclusive Local *LocalEtcd `json:"local,omitempty"` - // External describes how to connect to an external etcd cluster + // external describes how to connect to an external etcd cluster // Local and External are mutually exclusive External *ExternalEtcd `json:"external,omitempty"` } @@ -306,38 +306,38 @@ type LocalEtcd struct { // ImageMeta allows to customize the container used for etcd ImageMeta `json:",inline"` - // DataDir is the directory etcd will place its data. + // dataDir is the directory etcd will place its data. // Defaults to "/var/lib/etcd". // +optional DataDir string `json:"dataDir,omitempty"` - // ExtraArgs are extra arguments provided to the etcd binary + // extraArgs are extra arguments provided to the etcd binary // when run inside a static pod. // A key in this map is the flag name as it appears on the // command line except without leading dash(es). ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert. ServerCertSANs []string `json:"serverCertSANs,omitempty"` - // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. PeerCertSANs []string `json:"peerCertSANs,omitempty"` } // ExternalEtcd describes an external etcd cluster. // Kubeadm has no knowledge of where certificate files live and they must be supplied. type ExternalEtcd struct { - // Endpoints of etcd members. Required for ExternalEtcd. + // endpoints of etcd members. Required for ExternalEtcd. Endpoints []string `json:"endpoints"` - // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // caFile is an SSL Certificate Authority file used to secure etcd communication. // Required if using a TLS connection. CAFile string `json:"caFile"` - // CertFile is an SSL certification file used to secure etcd communication. + // certFile is an SSL certification file used to secure etcd communication. // Required if using a TLS connection. CertFile string `json:"certFile"` - // KeyFile is an SSL key file used to secure etcd communication. + // keyFile is an SSL key file used to secure etcd communication. // Required if using a TLS connection. KeyFile string `json:"keyFile"` } @@ -348,23 +348,23 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // CACertPath is the path to the SSL certificate authority used to + // caCertPath is the path to the SSL certificate authority used to // secure comunications between node and control-plane. // Defaults to "/etc/kubernetes/pki/ca.crt". // +optional CACertPath string `json:"caCertPath,omitempty"` - // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // discovery specifies the options for the kubelet to use during the TLS Bootstrap process // +optional Discovery Discovery `json:"discovery,omitempty"` - // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // controlPlane defines the additional control plane instance to be deployed on the joining node. // If nil, no additional control plane instance will be deployed. // +optional ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` @@ -372,10 +372,10 @@ type JoinConfiguration struct { // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret + // certificateKey is the key that is used for decryption of certificates after they are downloaded from the secret // upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration. // +optional CertificateKey string `json:"certificateKey,omitempty"` @@ -383,34 +383,34 @@ type JoinControlPlane struct { // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. type Discovery struct { - // BootstrapToken is used to set the options for bootstrap token based discovery + // bootstrapToken is used to set the options for bootstrap token based discovery // BootstrapToken and File are mutually exclusive BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` - // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // file is used to specify a file or URL to a kubeconfig file from which to load cluster information // BootstrapToken and File are mutually exclusive File *FileDiscovery `json:"file,omitempty"` - // TLSBootstrapToken is a token used for TLS bootstrapping. + // tlsBootstrapToken is a token used for TLS bootstrapping. // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information // +optional TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty"` - // Timeout modifies the discovery timeout + // timeout modifies the discovery timeout Timeout *metav1.Duration `json:"timeout,omitempty"` } // BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. type BootstrapTokenDiscovery struct { - // Token is a token used to validate cluster information + // token is a token used to validate cluster information // fetched from the control-plane. Token string `json:"token"` - // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // apiServerEndpoint is an IP or domain name to the API server from which info will be fetched. APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` - // CACertHashes specifies a set of public key pins to verify + // caCertHashes specifies a set of public key pins to verify // when token-based discovery is used. The root CA found during discovery // must match one of these values. Specifying an empty set disables root CA // pinning, which can be unsafe. Each hash is specified as ":", @@ -419,7 +419,7 @@ type BootstrapTokenDiscovery struct { // ASN.1. These hashes can be calculated using, for example, OpenSSL. CACertHashes []string `json:"caCertHashes,omitempty"` - // UnsafeSkipCAVerification allows token-based discovery + // unsafeSkipCAVerification allows token-based discovery // without CA verification via CACertHashes. This can weaken // the security of kubeadm since other nodes can impersonate the control-plane. UnsafeSkipCAVerification bool `json:"unsafeSkipCAVerification,omitempty"` @@ -427,22 +427,22 @@ type BootstrapTokenDiscovery struct { // FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. type FileDiscovery struct { - // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + // kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information KubeConfigPath string `json:"kubeConfigPath"` } // HostPathMount contains elements describing volumes that are mounted from the // host. type HostPathMount struct { - // Name of the volume inside the pod template. + // name of the volume inside the pod template. Name string `json:"name"` - // HostPath is the path in the host that will be mounted inside + // hostPath is the path in the host that will be mounted inside // the pod. HostPath string `json:"hostPath"` - // MountPath is the path inside the pod where hostPath will be mounted. + // mountPath is the path inside the pod where hostPath will be mounted. MountPath string `json:"mountPath"` - // ReadOnly controls write access to the volume + // readOnly controls write access to the volume ReadOnly bool `json:"readOnly,omitempty"` - // PathType is the type of the HostPath. + // pathType is the type of the HostPath. PathType corev1.HostPathType `json:"pathType,omitempty"` } diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/types.go b/bootstrap/kubeadm/types/upstreamv1beta3/types.go index c251870a1a38..4da549a8b6e1 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta3/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/types.go @@ -32,16 +32,16 @@ type InitConfiguration struct { // After that, the information in the fields IS NOT uploaded to the `kubeadm-config` ConfigMap // that is used by `kubeadm upgrade` for instance. These fields must be omitempty. - // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature // +optional BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible @@ -50,18 +50,18 @@ type InitConfiguration struct { // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in + // certificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in // a secret in the cluster during the uploadcerts init phase. // +optional CertificateKey string `json:"certificateKey,omitempty"` - // SkipPhases is a list of phases to skip during command execution. + // skipPhases is a list of phases to skip during command execution. // The list of phases can be obtained with the "kubeadm init --help" command. // The flag "--skip-phases" takes precedence over this field. // +optional SkipPhases []string `json:"skipPhases,omitempty"` - // Patches contains options related to applying patches to components deployed by kubeadm during + // patches contains options related to applying patches to components deployed by kubeadm during // "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22 // +optional Patches *Patches `json:"patches,omitempty"` @@ -73,19 +73,19 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` - // Etcd holds configuration for etcd. + // etcd holds configuration for etcd. // +optional Etcd Etcd `json:"etcd,omitempty"` - // Networking holds configuration for the networking topology of the cluster. + // networking holds configuration for the networking topology of the cluster. // +optional Networking Networking `json:"networking,omitempty"` - // KubernetesVersion is the target version of the control plane. + // kubernetesVersion is the target version of the control plane. // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, @@ -99,34 +99,34 @@ type ClusterConfiguration struct { // +optional ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` - // APIServer contains extra settings for the API server control plane component + // apiServer contains extra settings for the API server control plane component // +optional APIServer APIServer `json:"apiServer,omitempty"` - // ControllerManager contains extra settings for the controller manager control plane component + // controllerManager contains extra settings for the controller manager control plane component // +optional ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` - // Scheduler contains extra settings for the scheduler control plane component + // scheduler contains extra settings for the scheduler control plane component // +optional Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` - // DNS defines the options for the DNS add-on installed in the cluster. + // dns defines the options for the DNS add-on installed in the cluster. // +optional DNS DNS `json:"dns,omitempty"` - // CertificatesDir specifies where to store or look for all required certificates. + // certificatesDir specifies where to store or look for all required certificates. // +optional CertificatesDir string `json:"certificatesDir,omitempty"` - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // If empty, `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `registry.k8s.io` // will be used for all the other images. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // FeatureGates enabled by the user. + // featureGates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` @@ -137,12 +137,12 @@ type ClusterConfiguration struct { // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { - // ExtraArgs is an extra set of flags to pass to the control plane component. + // extraArgs is an extra set of flags to pass to the control plane component. // TODO: This is temporary and ideally we would like to switch all components to use ComponentConfig + ConfigMaps. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // extraVolumes is an extra set of host volumes, mounted to the control plane component. // +optional ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` } @@ -151,11 +151,11 @@ type ControlPlaneComponent struct { type APIServer struct { ControlPlaneComponent `json:",inline"` - // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // certSANs sets extra Subject Alternative Names for the API Server signing cert. // +optional CertSANs []string `json:"certSANs,omitempty"` - // TimeoutForControlPlane controls the timeout that we use for API server to appear + // timeoutForControlPlane controls the timeout that we use for API server to appear // +optional TimeoutForControlPlane *metav1.Duration `json:"timeoutForControlPlane,omitempty"` } @@ -172,12 +172,12 @@ type DNS struct { // ImageMeta allows to customize the image used for components that are not // originated from the Kubernetes/Kubernetes release process. type ImageMeta struct { - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // ImageTag allows to specify a tag for the image. + // imageTag allows to specify a tag for the image. // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. // +optional ImageTag string `json:"imageTag,omitempty"` @@ -187,11 +187,11 @@ type ImageMeta struct { // APIEndpoint struct contains elements of API server instance deployed on a node. type APIEndpoint struct { - // AdvertiseAddress sets the IP address for the API server to advertise. + // advertiseAddress sets the IP address for the API server to advertise. // +optional AdvertiseAddress string `json:"advertiseAddress,omitempty"` - // BindPort sets the secure port for the API Server to bind to. + // bindPort sets the secure port for the API Server to bind to. // Defaults to 6443. // +optional BindPort int32 `json:"bindPort,omitempty"` @@ -200,32 +200,32 @@ type APIEndpoint struct { // NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join". type NodeRegistrationOptions struct { - // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. // This field is also used in the CommonName field of the kubelet's client certificate to the API server. // Defaults to the hostname of the node if not provided. // +optional Name string `json:"name,omitempty"` - // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use // +optional CRISocket string `json:"criSocket,omitempty"` - // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + // taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process // it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an // empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. Taints []corev1.Taint `json:"taints"` - // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. // +optional KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"` - // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. + // ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. // +optional IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` - // ImagePullPolicy specifies the policy for image pulling + // imagePullPolicy specifies the policy for image pulling // during kubeadm "init" and "join" operations. The value of // this field must be one of "Always", "IfNotPresent" or // "Never". Defaults to "IfNotPresent". @@ -235,39 +235,39 @@ type NodeRegistrationOptions struct { // Networking contains elements describing cluster's networking configuration. type Networking struct { - // ServiceSubnet is the subnet used by k8s services. Defaults to "10.96.0.0/12". + // serviceSubnet is the subnet used by k8s services. Defaults to "10.96.0.0/12". // +optional ServiceSubnet string `json:"serviceSubnet,omitempty"` - // PodSubnet is the subnet used by pods. + // podSubnet is the subnet used by pods. // +optional PodSubnet string `json:"podSubnet,omitempty"` - // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local". // +optional DNSDomain string `json:"dnsDomain,omitempty"` } // BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. type BootstrapToken struct { - // Token is used for establishing bidirectional trust between nodes and control-planes. + // token is used for establishing bidirectional trust between nodes and control-planes. // Used for joining nodes in the cluster. Token *BootstrapTokenString `json:"token" datapolicy:"token"` - // Description sets a human-friendly message why this token exists and what it's used + // description sets a human-friendly message why this token exists and what it's used // for, so other administrators can know its purpose. // +optional Description string `json:"description,omitempty"` - // TTL defines the time to live for this token. Defaults to 24h. + // ttl defines the time to live for this token. Defaults to 24h. // Expires and TTL are mutually exclusive. // +optional TTL *metav1.Duration `json:"ttl,omitempty"` - // Expires specifies the timestamp when this token expires. Defaults to being set + // expires specifies the timestamp when this token expires. Defaults to being set // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. // +optional Expires *metav1.Time `json:"expires,omitempty"` - // Usages describes the ways in which this token can be used. Can by default be used + // usages describes the ways in which this token can be used. Can by default be used // for establishing bidirectional trust, but that can be changed here. // +optional Usages []string `json:"usages,omitempty"` - // Groups specifies the extra groups that this token will authenticate as when/if + // groups specifies the extra groups that this token will authenticate as when/if // used for authentication // +optional Groups []string `json:"groups,omitempty"` @@ -276,12 +276,12 @@ type BootstrapToken struct { // Etcd contains elements describing Etcd configuration. type Etcd struct { - // Local provides configuration knobs for configuring the local etcd instance + // local provides configuration knobs for configuring the local etcd instance // Local and External are mutually exclusive // +optional Local *LocalEtcd `json:"local,omitempty"` - // External describes how to connect to an external etcd cluster + // external describes how to connect to an external etcd cluster // Local and External are mutually exclusive // +optional External *ExternalEtcd `json:"external,omitempty"` @@ -292,19 +292,19 @@ type LocalEtcd struct { // ImageMeta allows to customize the container used for etcd ImageMeta `json:",inline"` - // DataDir is the directory etcd will place its data. + // dataDir is the directory etcd will place its data. // Defaults to "/var/lib/etcd". DataDir string `json:"dataDir"` - // ExtraArgs are extra arguments provided to the etcd binary + // extraArgs are extra arguments provided to the etcd binary // when run inside a static pod. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert. // +optional ServerCertSANs []string `json:"serverCertSANs,omitempty"` - // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. // +optional PeerCertSANs []string `json:"peerCertSANs,omitempty"` } @@ -312,18 +312,18 @@ type LocalEtcd struct { // ExternalEtcd describes an external etcd cluster. // Kubeadm has no knowledge of where certificate files live and they must be supplied. type ExternalEtcd struct { - // Endpoints of etcd members. Required for ExternalEtcd. + // endpoints of etcd members. Required for ExternalEtcd. Endpoints []string `json:"endpoints"` - // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // caFile is an SSL Certificate Authority file used to secure etcd communication. // Required if using a TLS connection. CAFile string `json:"caFile"` - // CertFile is an SSL certification file used to secure etcd communication. + // certFile is an SSL certification file used to secure etcd communication. // Required if using a TLS connection. CertFile string `json:"certFile"` - // KeyFile is an SSL key file used to secure etcd communication. + // keyFile is an SSL key file used to secure etcd communication. // Required if using a TLS connection. KeyFile string `json:"keyFile"` } @@ -334,31 +334,31 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // CACertPath is the path to the SSL certificate authority used to + // caCertPath is the path to the SSL certificate authority used to // secure comunications between node and control-plane. // Defaults to "/etc/kubernetes/pki/ca.crt". // +optional CACertPath string `json:"caCertPath,omitempty"` - // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // discovery specifies the options for the kubelet to use during the TLS Bootstrap process Discovery Discovery `json:"discovery"` - // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // controlPlane defines the additional control plane instance to be deployed on the joining node. // If nil, no additional control plane instance will be deployed. // +optional ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` - // SkipPhases is a list of phases to skip during command execution. + // skipPhases is a list of phases to skip during command execution. // The list of phases can be obtained with the "kubeadm join --help" command. // The flag "--skip-phases" takes precedence over this field. // +optional SkipPhases []string `json:"skipPhases,omitempty"` - // Patches contains options related to applying patches to components deployed by kubeadm during + // patches contains options related to applying patches to components deployed by kubeadm during // "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22 // +optional Patches *Patches `json:"patches,omitempty"` @@ -366,11 +366,11 @@ type JoinConfiguration struct { // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret + // certificateKey is the key that is used for decryption of certificates after they are downloaded from the secret // upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration. // +optional CertificateKey string `json:"certificateKey,omitempty"` @@ -378,38 +378,38 @@ type JoinControlPlane struct { // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. type Discovery struct { - // BootstrapToken is used to set the options for bootstrap token based discovery + // bootstrapToken is used to set the options for bootstrap token based discovery // BootstrapToken and File are mutually exclusive // +optional BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` - // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // file is used to specify a file or URL to a kubeconfig file from which to load cluster information // BootstrapToken and File are mutually exclusive // +optional File *FileDiscovery `json:"file,omitempty"` - // TLSBootstrapToken is a token used for TLS bootstrapping. + // tlsBootstrapToken is a token used for TLS bootstrapping. // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information // +optional TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty" datapolicy:"token"` - // Timeout modifies the discovery timeout + // timeout modifies the discovery timeout // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` } // BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. type BootstrapTokenDiscovery struct { - // Token is a token used to validate cluster information + // token is a token used to validate cluster information // fetched from the control-plane. Token string `json:"token" datapolicy:"token"` - // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // apiServerEndpoint is an IP or domain name to the API server from which info will be fetched. // +optional APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` - // CACertHashes specifies a set of public key pins to verify + // caCertHashes specifies a set of public key pins to verify // when token-based discovery is used. The root CA found during discovery // must match one of these values. Specifying an empty set disables root CA // pinning, which can be unsafe. Each hash is specified as ":", @@ -419,7 +419,7 @@ type BootstrapTokenDiscovery struct { // +optional CACertHashes []string `json:"caCertHashes,omitempty" datapolicy:"security-key"` - // UnsafeSkipCAVerification allows token-based discovery + // unsafeSkipCAVerification allows token-based discovery // without CA verification via CACertHashes. This can weaken // the security of kubeadm since other nodes can impersonate the control-plane. // +optional @@ -428,31 +428,31 @@ type BootstrapTokenDiscovery struct { // FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. type FileDiscovery struct { - // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + // kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information KubeConfigPath string `json:"kubeConfigPath"` } // HostPathMount contains elements describing volumes that are mounted from the // host. type HostPathMount struct { - // Name of the volume inside the pod template. + // name of the volume inside the pod template. Name string `json:"name"` - // HostPath is the path in the host that will be mounted inside + // hostPath is the path in the host that will be mounted inside // the pod. HostPath string `json:"hostPath"` - // MountPath is the path inside the pod where hostPath will be mounted. + // mountPath is the path inside the pod where hostPath will be mounted. MountPath string `json:"mountPath"` - // ReadOnly controls write access to the volume + // readOnly controls write access to the volume // +optional ReadOnly bool `json:"readOnly,omitempty"` - // PathType is the type of the HostPath. + // pathType is the type of the HostPath. // +optional PathType corev1.HostPathType `json:"pathType,omitempty"` } // Patches contains options related to applying patches to components deployed by kubeadm. type Patches struct { - // Directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + // directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". // For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of // "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one // of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/types.go b/bootstrap/kubeadm/types/upstreamv1beta4/types.go index 19f937b897d4..a0d315002338 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta4/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta4/types.go @@ -32,20 +32,20 @@ type InitConfiguration struct { // After that, the information in the fields IS NOT uploaded to the `kubeadm-config` ConfigMap // that is used by `kubeadm upgrade` for instance. These fields must be omitempty. - // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature // +optional BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` - // DryRun tells if the dry run mode is enabled, don't apply any change if it is and just output what would be done. + // dryRun tells if the dry run mode is enabled, don't apply any change if it is and just output what would be done. // +optional DryRun bool `json:"dryRun,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible @@ -54,24 +54,24 @@ type InitConfiguration struct { // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in + // certificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in // a secret in the cluster during the uploadcerts init phase. // The certificate key is a hex encoded string that is an AES key of size 32 bytes. // +optional CertificateKey string `json:"certificateKey,omitempty"` - // SkipPhases is a list of phases to skip during command execution. + // skipPhases is a list of phases to skip during command execution. // The list of phases can be obtained with the "kubeadm init --help" command. // The flag "--skip-phases" takes precedence over this field. // +optional SkipPhases []string `json:"skipPhases,omitempty"` - // Patches contains options related to applying patches to components deployed by kubeadm during + // patches contains options related to applying patches to components deployed by kubeadm during // "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22. // +optional Patches *Patches `json:"patches,omitempty"` - // Timeouts holds various timeouts that apply to kubeadm commands. + // timeouts holds various timeouts that apply to kubeadm commands. // +optional Timeouts *Timeouts `json:"timeouts,omitempty"` } @@ -82,19 +82,19 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` - // Etcd holds configuration for etcd. + // etcd holds configuration for etcd. // +optional Etcd Etcd `json:"etcd,omitempty"` - // Networking holds configuration for the networking topology of the cluster. + // networking holds configuration for the networking topology of the cluster. // +optional Networking Networking `json:"networking,omitempty"` - // KubernetesVersion is the target version of the control plane. + // kubernetesVersion is the target version of the control plane. // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, @@ -108,37 +108,37 @@ type ClusterConfiguration struct { // +optional ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` - // APIServer contains extra settings for the API server control plane component + // apiServer contains extra settings for the API server control plane component // +optional APIServer APIServer `json:"apiServer,omitempty"` - // ControllerManager contains extra settings for the controller manager control plane component + // controllerManager contains extra settings for the controller manager control plane component // +optional ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` - // Scheduler contains extra settings for the scheduler control plane component + // scheduler contains extra settings for the scheduler control plane component // +optional Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` - // DNS defines the options for the DNS add-on installed in the cluster. + // dns defines the options for the DNS add-on installed in the cluster. // +optional DNS DNS `json:"dns,omitempty"` - // Proxy defines the options for the proxy add-on installed in the cluster. + // proxy defines the options for the proxy add-on installed in the cluster. Proxy Proxy `json:"proxy,omitempty"` - // CertificatesDir specifies where to store or look for all required certificates. + // certificatesDir specifies where to store or look for all required certificates. // +optional CertificatesDir string `json:"certificatesDir,omitempty"` - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // If empty, `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/`) // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `registry.k8s.io` // will be used for all the other images. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // FeatureGates enabled by the user. + // featureGates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` @@ -146,17 +146,17 @@ type ClusterConfiguration struct { // +optional ClusterName string `json:"clusterName,omitempty"` - // EncryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. + // encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates. // Can be one of "RSA-2048" (default), "RSA-3072", "RSA-4096" or "ECDSA-P256". // +optional EncryptionAlgorithm EncryptionAlgorithmType `json:"encryptionAlgorithm,omitempty"` - // CertificateValidityPeriod specifies the validity period for a non-CA certificate generated by kubeadm. + // certificateValidityPeriod specifies the validity period for a non-CA certificate generated by kubeadm. // Default value: 8760h (365 days * 24 hours = 1 year) // +optional CertificateValidityPeriod *metav1.Duration `json:"certificateValidityPeriod,omitempty"` - // CACertificateValidityPeriod specifies the validity period for a CA certificate generated by kubeadm. + // caCertificateValidityPeriod specifies the validity period for a CA certificate generated by kubeadm. // Default value: 87600h (365 days * 24 hours * 10 = 10 years) // +optional CACertificateValidityPeriod *metav1.Duration `json:"caCertificateValidityPeriod,omitempty"` @@ -164,18 +164,18 @@ type ClusterConfiguration struct { // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { - // ExtraArgs is an extra set of flags to pass to the control plane component. + // extraArgs is an extra set of flags to pass to the control plane component. // An argument name in this list is the flag name as it appears on the // command line except without leading dash(es). Extra arguments will override existing // default arguments. Duplicate extra arguments are allowed. // +optional ExtraArgs []Arg `json:"extraArgs,omitempty"` - // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // extraVolumes is an extra set of host volumes, mounted to the control plane component. // +optional ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` - // ExtraEnvs is an extra set of environment variables to pass to the control plane component. + // extraEnvs is an extra set of environment variables to pass to the control plane component. // Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. // +optional ExtraEnvs []EnvVar `json:"extraEnvs,omitempty"` @@ -185,7 +185,7 @@ type ControlPlaneComponent struct { type APIServer struct { ControlPlaneComponent `json:",inline"` - // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // certSANs sets extra Subject Alternative Names for the API Server signing cert. // +optional CertSANs []string `json:"certSANs,omitempty"` } @@ -195,14 +195,14 @@ type DNS struct { // ImageMeta allows to customize the image used for the DNS addon ImageMeta `json:",inline"` - // Disabled specifies whether to disable this addon in the cluster + // disabled specifies whether to disable this addon in the cluster // +optional Disabled bool `json:"disabled,omitempty"` } // Proxy defines the proxy addon that should be used in the cluster. type Proxy struct { - // Disabled specifies whether to disable this addon in the cluster + // disabled specifies whether to disable this addon in the cluster // +optional Disabled bool `json:"disabled,omitempty"` } @@ -210,12 +210,12 @@ type Proxy struct { // ImageMeta allows to customize the image used for components that are not // originated from the Kubernetes/Kubernetes release process. type ImageMeta struct { - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // ImageTag allows to specify a tag for the image. + // imageTag allows to specify a tag for the image. // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. // +optional ImageTag string `json:"imageTag,omitempty"` @@ -225,11 +225,11 @@ type ImageMeta struct { // APIEndpoint struct contains elements of API server instance deployed on a node. type APIEndpoint struct { - // AdvertiseAddress sets the IP address for the API server to advertise. + // advertiseAddress sets the IP address for the API server to advertise. // +optional AdvertiseAddress string `json:"advertiseAddress,omitempty"` - // BindPort sets the secure port for the API Server to bind to. + // bindPort sets the secure port for the API Server to bind to. // Defaults to 6443. // +optional BindPort int32 `json:"bindPort,omitempty"` @@ -238,22 +238,22 @@ type APIEndpoint struct { // NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join". type NodeRegistrationOptions struct { - // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. // This field is also used in the CommonName field of the kubelet's client certificate to the API server. // Defaults to the hostname of the node if not provided. // +optional Name string `json:"name,omitempty"` - // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use // +optional CRISocket string `json:"criSocket,omitempty"` - // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, + // taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, // it will be defaulted with a control-plane taint for control-plane nodes. If you don't want to taint your control-plane // node, set this field to an empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration. Taints []corev1.Taint `json:"taints"` - // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config ConfigMap // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. // An argument name in this list is the flag name as it appears on the command line except without leading dash(es). @@ -261,18 +261,18 @@ type NodeRegistrationOptions struct { // +optional KubeletExtraArgs []Arg `json:"kubeletExtraArgs,omitempty"` - // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. + // ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered, e.g. 'IsPrivilegedUser,Swap'. // Value 'all' ignores errors from all checks. // +optional IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` - // ImagePullPolicy specifies the policy for image pulling during kubeadm "init" and "join" operations. + // imagePullPolicy specifies the policy for image pulling during kubeadm "init" and "join" operations. // The value of this field must be one of "Always", "IfNotPresent" or "Never". // If this field is unset kubeadm will default it to "IfNotPresent", or pull the required images if not present on the host. // +optional ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` - // ImagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. + // imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. // Default: true // +optional ImagePullSerial *bool `json:"imagePullSerial,omitempty"` @@ -280,13 +280,13 @@ type NodeRegistrationOptions struct { // Networking contains elements describing cluster's networking configuration. type Networking struct { - // ServiceSubnet is the subnet used by k8s services. Defaults to "10.96.0.0/12". + // serviceSubnet is the subnet used by k8s services. Defaults to "10.96.0.0/12". // +optional ServiceSubnet string `json:"serviceSubnet,omitempty"` - // PodSubnet is the subnet used by pods. + // podSubnet is the subnet used by pods. // +optional PodSubnet string `json:"podSubnet,omitempty"` - // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local". // +optional DNSDomain string `json:"dnsDomain,omitempty"` } @@ -294,26 +294,26 @@ type Networking struct { // BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. // +k8s:deepcopy-gen=true type BootstrapToken struct { - // Token is used for establishing bidirectional trust between nodes and control-planes. + // token is used for establishing bidirectional trust between nodes and control-planes. // Used for joining nodes in the cluster. Token *BootstrapTokenString `json:"token" datapolicy:"token"` - // Description sets a human-friendly message why this token exists and what it's used + // description sets a human-friendly message why this token exists and what it's used // for, so other administrators can know its purpose. // +optional Description string `json:"description,omitempty"` - // TTL defines the time to live for this token. Defaults to 24h. + // ttl defines the time to live for this token. Defaults to 24h. // Expires and TTL are mutually exclusive. // +optional TTL *metav1.Duration `json:"ttl,omitempty"` - // Expires specifies the timestamp when this token expires. Defaults to being set + // expires specifies the timestamp when this token expires. Defaults to being set // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. // +optional Expires *metav1.Time `json:"expires,omitempty"` - // Usages describes the ways in which this token can be used. Can by default be used + // usages describes the ways in which this token can be used. Can by default be used // for establishing bidirectional trust, but that can be changed here. // +optional Usages []string `json:"usages,omitempty"` - // Groups specifies the extra groups that this token will authenticate as when/if + // groups specifies the extra groups that this token will authenticate as when/if // used for authentication // +optional Groups []string `json:"groups,omitempty"` @@ -322,12 +322,12 @@ type BootstrapToken struct { // Etcd contains elements describing Etcd configuration. type Etcd struct { - // Local provides configuration knobs for configuring the local etcd instance + // local provides configuration knobs for configuring the local etcd instance // Local and External are mutually exclusive // +optional Local *LocalEtcd `json:"local,omitempty"` - // External describes how to connect to an external etcd cluster + // external describes how to connect to an external etcd cluster // Local and External are mutually exclusive // +optional External *ExternalEtcd `json:"external,omitempty"` @@ -338,11 +338,11 @@ type LocalEtcd struct { // ImageMeta allows to customize the container used for etcd ImageMeta `json:",inline"` - // DataDir is the directory etcd will place its data. + // dataDir is the directory etcd will place its data. // Defaults to "/var/lib/etcd". DataDir string `json:"dataDir"` - // ExtraArgs are extra arguments provided to the etcd binary + // extraArgs are extra arguments provided to the etcd binary // when run inside a static pod. // An argument name in this list is the flag name as it appears on the // command line except without leading dash(es). Extra arguments will override existing @@ -350,15 +350,15 @@ type LocalEtcd struct { // +optional ExtraArgs []Arg `json:"extraArgs,omitempty"` - // ExtraEnvs is an extra set of environment variables to pass to the control plane component. + // extraEnvs is an extra set of environment variables to pass to the control plane component. // Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. // +optional ExtraEnvs []EnvVar `json:"extraEnvs,omitempty"` - // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert. // +optional ServerCertSANs []string `json:"serverCertSANs,omitempty"` - // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. // +optional PeerCertSANs []string `json:"peerCertSANs,omitempty"` } @@ -366,18 +366,18 @@ type LocalEtcd struct { // ExternalEtcd describes an external etcd cluster. // Kubeadm has no knowledge of where certificate files live and they must be supplied. type ExternalEtcd struct { - // Endpoints of etcd members. Required for ExternalEtcd. + // endpoints of etcd members. Required for ExternalEtcd. Endpoints []string `json:"endpoints"` - // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // caFile is an SSL Certificate Authority file used to secure etcd communication. // Required if using a TLS connection. CAFile string `json:"caFile"` - // CertFile is an SSL certification file used to secure etcd communication. + // certFile is an SSL certification file used to secure etcd communication. // Required if using a TLS connection. CertFile string `json:"certFile"` - // KeyFile is an SSL key file used to secure etcd communication. + // keyFile is an SSL key file used to secure etcd communication. // Required if using a TLS connection. KeyFile string `json:"keyFile"` } @@ -388,51 +388,51 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` - // DryRun tells if the dry run mode is enabled, don't apply any change if it is and just output what would be done. + // dryRun tells if the dry run mode is enabled, don't apply any change if it is and just output what would be done. // +optional DryRun bool `json:"dryRun,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // CACertPath is the path to the SSL certificate authority used to + // caCertPath is the path to the SSL certificate authority used to // secure comunications between node and control-plane. // Defaults to "/etc/kubernetes/pki/ca.crt". // +optional CACertPath string `json:"caCertPath,omitempty"` - // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // discovery specifies the options for the kubelet to use during the TLS Bootstrap process Discovery Discovery `json:"discovery"` - // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // controlPlane defines the additional control plane instance to be deployed on the joining node. // If nil, no additional control plane instance will be deployed. // +optional ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` - // SkipPhases is a list of phases to skip during command execution. + // skipPhases is a list of phases to skip during command execution. // The list of phases can be obtained with the "kubeadm join --help" command. // The flag "--skip-phases" takes precedence over this field. // +optional SkipPhases []string `json:"skipPhases,omitempty"` - // Patches contains options related to applying patches to components deployed by kubeadm during + // patches contains options related to applying patches to components deployed by kubeadm during // "kubeadm join". The minimum kubernetes version needed to support Patches is v1.22. // +optional Patches *Patches `json:"patches,omitempty"` - // Timeouts holds various timeouts that apply to kubeadm commands. + // timeouts holds various timeouts that apply to kubeadm commands. // +optional Timeouts *Timeouts `json:"timeouts,omitempty"` } // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` - // CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret + // certificateKey is the key that is used for decryption of certificates after they are downloaded from the secret // upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration. // The certificate key is a hex encoded string that is an AES key of size 32 bytes. // +optional @@ -441,17 +441,17 @@ type JoinControlPlane struct { // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. type Discovery struct { - // BootstrapToken is used to set the options for bootstrap token based discovery + // bootstrapToken is used to set the options for bootstrap token based discovery // BootstrapToken and File are mutually exclusive // +optional BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` - // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // file is used to specify a file or URL to a kubeconfig file from which to load cluster information // BootstrapToken and File are mutually exclusive // +optional File *FileDiscovery `json:"file,omitempty"` - // TLSBootstrapToken is a token used for TLS bootstrapping. + // tlsBootstrapToken is a token used for TLS bootstrapping. // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information // +optional @@ -460,15 +460,15 @@ type Discovery struct { // BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. type BootstrapTokenDiscovery struct { - // Token is a token used to validate cluster information + // token is a token used to validate cluster information // fetched from the control-plane. Token string `json:"token" datapolicy:"token"` - // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // apiServerEndpoint is an IP or domain name to the API server from which info will be fetched. // +optional APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` - // CACertHashes specifies a set of public key pins to verify + // caCertHashes specifies a set of public key pins to verify // when token-based discovery is used. The root CA found during discovery // must match one of these values. Specifying an empty set disables root CA // pinning, which can be unsafe. Each hash is specified as ":", @@ -478,7 +478,7 @@ type BootstrapTokenDiscovery struct { // +optional CACertHashes []string `json:"caCertHashes,omitempty" datapolicy:"security-key"` - // UnsafeSkipCAVerification allows token-based discovery + // unsafeSkipCAVerification allows token-based discovery // without CA verification via CACertHashes. This can weaken // the security of kubeadm since other nodes can impersonate the control-plane. // +optional @@ -487,31 +487,31 @@ type BootstrapTokenDiscovery struct { // FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. type FileDiscovery struct { - // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + // kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information KubeConfigPath string `json:"kubeConfigPath"` } // HostPathMount contains elements describing volumes that are mounted from the // host. type HostPathMount struct { - // Name of the volume inside the pod template. + // name of the volume inside the pod template. Name string `json:"name"` - // HostPath is the path in the host that will be mounted inside + // hostPath is the path in the host that will be mounted inside // the pod. HostPath string `json:"hostPath"` - // MountPath is the path inside the pod where hostPath will be mounted. + // mountPath is the path inside the pod where hostPath will be mounted. MountPath string `json:"mountPath"` - // ReadOnly controls write access to the volume + // readOnly controls write access to the volume // +optional ReadOnly bool `json:"readOnly,omitempty"` - // PathType is the type of the HostPath. + // pathType is the type of the HostPath. // +optional PathType corev1.HostPathType `json:"pathType,omitempty"` } // Patches contains options related to applying patches to components deployed by kubeadm. type Patches struct { - // Directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". + // directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". // For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of // "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd", "kubeletconfiguration", "corednsdeployment". // "patchtype" can be one of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. @@ -549,43 +549,43 @@ const ( // Timeouts holds various timeouts that apply to kubeadm commands. type Timeouts struct { - // ControlPlaneComponentHealthCheck is the amount of time to wait for a control plane + // controlPlaneComponentHealthCheck is the amount of time to wait for a control plane // component, such as the API server, to be healthy during "kubeadm init" and "kubeadm join". // Default: 4m // +optional ControlPlaneComponentHealthCheck *metav1.Duration `json:"controlPlaneComponentHealthCheck,omitempty"` - // KubeletHealthCheck is the amount of time to wait for the kubelet to be healthy + // kubeletHealthCheck is the amount of time to wait for the kubelet to be healthy // during "kubeadm init" and "kubeadm join". // Default: 4m // +optional KubeletHealthCheck *metav1.Duration `json:"kubeletHealthCheck,omitempty"` - // KubernetesAPICall is the amount of time to wait for the kubeadm client to complete a request to + // kubernetesAPICall is the amount of time to wait for the kubeadm client to complete a request to // the API server. This applies to all types of methods (GET, POST, etc). // Default: 1m // +optional KubernetesAPICall *metav1.Duration `json:"kubernetesAPICall,omitempty"` - // EtcdAPICall is the amount of time to wait for the kubeadm etcd client to complete a request to + // etcdAPICall is the amount of time to wait for the kubeadm etcd client to complete a request to // the etcd cluster. // Default: 2m // +optional EtcdAPICall *metav1.Duration `json:"etcdAPICall,omitempty"` - // TLSBootstrap is the amount of time to wait for the kubelet to complete TLS bootstrap + // tlsBootstrap is the amount of time to wait for the kubelet to complete TLS bootstrap // for a joining node. // Default: 5m // +optional TLSBootstrap *metav1.Duration `json:"tlsBootstrap,omitempty"` - // Discovery is the amount of time to wait for kubeadm to validate the API server identity + // discovery is the amount of time to wait for kubeadm to validate the API server identity // for a joining node. // Default: 5m // +optional Discovery *metav1.Duration `json:"discovery,omitempty"` - // UpgradeManifests is the timeout for upgrading static Pod manifests + // upgradeManifests is the timeout for upgrading static Pod manifests // Default: 5m UpgradeManifests *metav1.Duration `json:"upgradeManifests,omitempty"` } diff --git a/cmd/clusterctl/api/v1alpha3/metadata_type.go b/cmd/clusterctl/api/v1alpha3/metadata_type.go index e2ab85a630ba..6533491fb2ed 100644 --- a/cmd/clusterctl/api/v1alpha3/metadata_type.go +++ b/cmd/clusterctl/api/v1alpha3/metadata_type.go @@ -35,13 +35,13 @@ type Metadata struct { // ReleaseSeries maps a provider release series (major/minor) with a API Version of Cluster API (contract). type ReleaseSeries struct { - // Major version of the release series + // major version of the release series Major uint `json:"major,omitempty"` - // Minor version of the release series + // minor version of the release series Minor uint `json:"minor,omitempty"` - // Contract defines the Cluster API contract supported by this series. + // contract defines the Cluster API contract supported by this series. // // The value is an API Version, e.g. `v1alpha3`. Contract string `json:"contract,omitempty"` diff --git a/cmd/clusterctl/api/v1alpha3/provider_type.go b/cmd/clusterctl/api/v1alpha3/provider_type.go index 0c923646d659..d7bb6235ad88 100644 --- a/cmd/clusterctl/api/v1alpha3/provider_type.go +++ b/cmd/clusterctl/api/v1alpha3/provider_type.go @@ -34,20 +34,20 @@ type Provider struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // ProviderName indicates the name of the provider. + // providerName indicates the name of the provider. // +optional ProviderName string `json:"providerName,omitempty"` - // Type indicates the type of the provider. + // type indicates the type of the provider. // See ProviderType for a list of supported values // +optional Type string `json:"type,omitempty"` - // Version indicates the component version. + // version indicates the component version. // +optional Version string `json:"version,omitempty"` - // WatchedNamespace indicates the namespace where the provider controller is watching. + // watchedNamespace indicates the namespace where the provider controller is watching. // If empty the provider controller is watching for objects in all namespaces. // // Deprecated: providers complying with the Cluster API v1alpha4 contract or above must watch all namespaces; this field will be removed in a future version of this API diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go index c920e0481974..514f200035c9 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -84,7 +84,7 @@ type KubeadmControlPlaneSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // Version defines the desired Kubernetes version. + // version defines the desired Kubernetes version. // Please note that if kubeadmConfigSpec.ClusterConfiguration.imageRepository is not set // we don't allow upgrades to versions >= v1.22.0 for which kubeadm uses the old registry (k8s.gcr.io). // Please use a newer patch version with the new registry instead. The default registries of kubeadm are: @@ -92,20 +92,20 @@ type KubeadmControlPlaneSpec struct { // * k8s.gcr.io (old registry): all older versions Version string `json:"version"` - // MachineTemplate contains information about how machines + // machineTemplate contains information about how machines // should be shaped when creating or updating a control plane. MachineTemplate KubeadmControlPlaneMachineTemplate `json:"machineTemplate"` - // KubeadmConfigSpec is a KubeadmConfigSpec + // kubeadmConfigSpec is a KubeadmConfigSpec // to use for initializing and joining machines to the control plane. KubeadmConfigSpec bootstrapv1.KubeadmConfigSpec `json:"kubeadmConfigSpec"` - // RolloutBefore is a field to indicate a rollout should be performed + // rolloutBefore is a field to indicate a rollout should be performed // if the specified criteria is met. // +optional RolloutBefore *RolloutBefore `json:"rolloutBefore,omitempty"` - // RolloutAfter is a field to indicate a rollout should be performed + // rolloutAfter is a field to indicate a rollout should be performed // after the specified time even if no changes have been made to the // KubeadmControlPlane. // Example: In the YAML the time can be specified in the RFC3339 format. @@ -133,22 +133,22 @@ type KubeadmControlPlaneMachineTemplate struct { // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` - // InfrastructureRef is a required reference to a custom resource + // infrastructureRef is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // If no value is provided, the default value for this property of the Machine resource will be used. // +optional @@ -157,7 +157,7 @@ type KubeadmControlPlaneMachineTemplate struct { // RolloutBefore describes when a rollout should be performed on the KCP machines. type RolloutBefore struct { - // CertificatesExpiryDays indicates a rollout needs to be performed if the + // certificatesExpiryDays indicates a rollout needs to be performed if the // certificates of the machine will expire within the specified days. // +optional CertificatesExpiryDays *int32 `json:"certificatesExpiryDays,omitempty"` @@ -166,7 +166,7 @@ type RolloutBefore struct { // RolloutStrategy describes how to replace existing machines // with new ones. type RolloutStrategy struct { - // Type of rollout. Currently the only supported strategy is + // type of rollout. Currently the only supported strategy is // "RollingUpdate". // Default is RollingUpdate. // +optional @@ -192,7 +192,7 @@ type RollingUpdate struct { // RemediationStrategy allows to define how control plane machine remediation happens. type RemediationStrategy struct { - // MaxRetry is the Max number of retries while attempting to remediate an unhealthy machine. + // maxRetry is the Max number of retries while attempting to remediate an unhealthy machine. // A retry happens when a machine that was created as a replacement for an unhealthy machine also fails. // For example, given a control plane with three machines M1, M2, M3: // @@ -209,14 +209,14 @@ type RemediationStrategy struct { // +optional MaxRetry *int32 `json:"maxRetry,omitempty"` - // RetryPeriod is the duration that KCP should wait before remediating a machine being created as a replacement + // retryPeriod is the duration that KCP should wait before remediating a machine being created as a replacement // for an unhealthy machine (a retry). // // If not set, a retry will happen immediately. // +optional RetryPeriod metav1.Duration `json:"retryPeriod,omitempty"` - // MinHealthyPeriod defines the duration after which KCP will consider any failure to a machine unrelated + // minHealthyPeriod defines the duration after which KCP will consider any failure to a machine unrelated // from the previous one. In this case the remediation is not considered a retry anymore, and thus the retry // counter restarts from 0. For example, assuming MinHealthyPeriod is set to 1h (default) // @@ -236,7 +236,7 @@ type RemediationStrategy struct { // KubeadmControlPlaneStatus defines the observed state of KubeadmControlPlane. type KubeadmControlPlaneStatus struct { - // Selector is the label selector in string format to avoid introspection + // selector is the label selector in string format to avoid introspection // by clients, and is used to provide the CRD-based integration for the // scale subresource and additional integrations for things like kubectl // describe.. The string will be in the same format as the query-param syntax. @@ -249,7 +249,7 @@ type KubeadmControlPlaneStatus struct { // +optional Replicas int32 `json:"replicas"` - // Version represents the minimum Kubernetes version for the control plane machines + // version represents the minimum Kubernetes version for the control plane machines // in the cluster. // +optional Version *string `json:"version,omitempty"` @@ -271,12 +271,12 @@ type KubeadmControlPlaneStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas"` - // Initialized denotes whether or not the control plane has the + // initialized denotes whether or not the control plane has the // uploaded kubeadm-config configmap. // +optional Initialized bool `json:"initialized"` - // Ready denotes that the KubeadmControlPlane API Server became ready during initial provisioning + // ready denotes that the KubeadmControlPlane API Server became ready during initial provisioning // to receive requests. // NOTE: this field is part of the Cluster API contract and it is used to orchestrate provisioning. // The value of this field is never updated after provisioning is completed. Please use conditions @@ -284,7 +284,7 @@ type KubeadmControlPlaneStatus struct { // +optional Ready bool `json:"ready"` - // FailureReason indicates that there is a terminal problem reconciling the + // failureReason indicates that there is a terminal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional @@ -295,15 +295,15 @@ type KubeadmControlPlaneStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the KubeadmControlPlane. + // conditions defines current service state of the KubeadmControlPlane. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` - // LastRemediation stores info about last remediation performed. + // lastRemediation stores info about last remediation performed. // +optional LastRemediation *LastRemediationStatus `json:"lastRemediation,omitempty"` @@ -341,13 +341,13 @@ type KubeadmControlPlaneV1Beta2Status struct { // NOTE: if for any reason information about last remediation are lost, RetryCount is going to restart from 0 and thus // more remediations than expected might happen. type LastRemediationStatus struct { - // Machine is the machine name of the latest machine being remediated. + // machine is the machine name of the latest machine being remediated. Machine string `json:"machine"` - // Timestamp is when last remediation happened. It is represented in RFC3339 form and is in UTC. + // timestamp is when last remediation happened. It is represented in RFC3339 form and is in UTC. Timestamp metav1.Time `json:"timestamp"` - // RetryCount used to keep track of remediation retry for the last remediated machine. + // retryCount used to keep track of remediation retry for the last remediated machine. // A retry happens when a machine that was created as a replacement for an unhealthy machine also fails. RetryCount int32 `json:"retryCount"` } diff --git a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go index 478e30c7e786..e8d1fe8b0463 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go @@ -70,22 +70,22 @@ type KubeadmControlPlaneTemplateResource struct { // because they are calculated by the Cluster topology reconciler during reconciliation and thus cannot // be configured on the KubeadmControlPlaneTemplate. type KubeadmControlPlaneTemplateResourceSpec struct { - // MachineTemplate contains information about how machines + // machineTemplate contains information about how machines // should be shaped when creating or updating a control plane. // +optional MachineTemplate *KubeadmControlPlaneTemplateMachineTemplate `json:"machineTemplate,omitempty"` - // KubeadmConfigSpec is a KubeadmConfigSpec + // kubeadmConfigSpec is a KubeadmConfigSpec // to use for initializing and joining machines to the control plane. KubeadmConfigSpec bootstrapv1.KubeadmConfigSpec `json:"kubeadmConfigSpec"` - // RolloutBefore is a field to indicate a rollout should be performed + // rolloutBefore is a field to indicate a rollout should be performed // if the specified criteria is met. // // +optional RolloutBefore *RolloutBefore `json:"rolloutBefore,omitempty"` - // RolloutAfter is a field to indicate a rollout should be performed + // rolloutAfter is a field to indicate a rollout should be performed // after the specified time even if no changes have been made to the // KubeadmControlPlane. // @@ -115,18 +115,18 @@ type KubeadmControlPlaneTemplateMachineTemplate struct { // +optional ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - // NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes + // nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes // to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. // +optional NodeVolumeDetachTimeout *metav1.Duration `json:"nodeVolumeDetachTimeout,omitempty"` - // NodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that the Machine + // nodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that the Machine // hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. // If no value is provided, the default value for this property of the Machine resource will be used. // +optional diff --git a/controlplane/kubeadm/internal/controllers/remediation.go b/controlplane/kubeadm/internal/controllers/remediation.go index e3a15668c593..e6ea53d423a2 100644 --- a/controlplane/kubeadm/internal/controllers/remediation.go +++ b/controlplane/kubeadm/internal/controllers/remediation.go @@ -452,13 +452,13 @@ func (r *KubeadmControlPlaneReconciler) canSafelyRemoveEtcdMember(ctx context.Co // RemediationData struct is used to keep track of information stored in the RemediationInProgressAnnotation in KCP // during remediation and then into the RemediationForAnnotation on the replacement machine once it is created. type RemediationData struct { - // Machine is the machine name of the latest machine being remediated. + // machine is the machine name of the latest machine being remediated. Machine string `json:"machine"` - // Timestamp is when last remediation happened. It is represented in RFC3339 form and is in UTC. + // timestamp is when last remediation happened. It is represented in RFC3339 form and is in UTC. Timestamp metav1.Time `json:"timestamp"` - // RetryCount used to keep track of remediation retry for the last remediated machine. + // retryCount used to keep track of remediation retry for the last remediated machine. // A retry happens when a machine that was created as a replacement for an unhealthy machine also fails. RetryCount int `json:"retryCount"` } diff --git a/exp/addons/api/v1beta1/clusterresourceset_types.go b/exp/addons/api/v1beta1/clusterresourceset_types.go index e8f1e7245c44..a061256044a3 100644 --- a/exp/addons/api/v1beta1/clusterresourceset_types.go +++ b/exp/addons/api/v1beta1/clusterresourceset_types.go @@ -41,11 +41,11 @@ type ClusterResourceSetSpec struct { // Label selector cannot be empty. ClusterSelector metav1.LabelSelector `json:"clusterSelector"` - // Resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. + // resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. // +optional Resources []ResourceRef `json:"resources,omitempty"` - // Strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. + // strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. // +kubebuilder:validation:Enum=ApplyOnce;Reconcile // +optional Strategy string `json:"strategy,omitempty"` @@ -64,11 +64,11 @@ const ( // ResourceRef specifies a resource. type ResourceRef struct { - // Name of the resource that is in the same namespace with ClusterResourceSet object. + // name of the resource that is in the same namespace with ClusterResourceSet object. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` - // Kind of the resource. Supported kinds are: Secrets and ConfigMaps. + // kind of the resource. Supported kinds are: Secrets and ConfigMaps. // +kubebuilder:validation:Enum=Secret;ConfigMap Kind string `json:"kind"` } @@ -94,11 +94,11 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy) // ClusterResourceSetStatus defines the observed state of ClusterResourceSet. type ClusterResourceSetStatus struct { - // ObservedGeneration reflects the generation of the most recently observed ClusterResourceSet. + // observedGeneration reflects the generation of the most recently observed ClusterResourceSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current state of the ClusterResourceSet. + // conditions defines current state of the ClusterResourceSet. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` diff --git a/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go b/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go index fd8933f7ba63..937df7700c2c 100644 --- a/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go +++ b/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go @@ -30,16 +30,16 @@ type ResourceBinding struct { // ResourceRef specifies a resource. ResourceRef `json:",inline"` - // Hash is the hash of a resource's data. This can be used to decide if a resource is changed. + // hash is the hash of a resource's data. This can be used to decide if a resource is changed. // For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. // +optional Hash string `json:"hash,omitempty"` - // LastAppliedTime identifies when this resource was last applied to the cluster. + // lastAppliedTime identifies when this resource was last applied to the cluster. // +optional LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"` - // Applied is to track if a resource is applied to the cluster or not. + // applied is to track if a resource is applied to the cluster or not. Applied bool `json:"applied"` } @@ -47,10 +47,10 @@ type ResourceBinding struct { // ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet. type ResourceSetBinding struct { - // ClusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. + // clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. ClusterResourceSetName string `json:"clusterResourceSetName"` - // Resources is a list of resources that the ClusterResourceSet has. + // resources is a list of resources that the ClusterResourceSet has. // +optional Resources []ResourceBinding `json:"resources,omitempty"` } @@ -182,11 +182,11 @@ type ClusterResourceSetBinding struct { // ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding. type ClusterResourceSetBindingSpec struct { - // Bindings is a list of ClusterResourceSets and their resources. + // bindings is a list of ClusterResourceSets and their resources. // +optional Bindings []*ResourceSetBinding `json:"bindings,omitempty"` - // ClusterName is the name of the Cluster this binding applies to. + // clusterName is the name of the Cluster this binding applies to. // Note: this field mandatory in v1beta2. // +optional ClusterName string `json:"clusterName,omitempty"` diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go index 263771918d94..22a77c384285 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/exp/api/v1beta1/machinepool_types.go @@ -33,7 +33,7 @@ const ( // MachinePoolSpec defines the desired state of MachinePool. type MachinePoolSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` @@ -42,7 +42,7 @@ type MachinePoolSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // Template describes the machines that will be created. + // 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 @@ -52,12 +52,12 @@ type MachinePoolSpec struct { // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // ProviderIDList are the identification IDs of machine instances provided by the provider. + // providerIDList are the identification IDs of machine instances provided by the provider. // This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. // +optional ProviderIDList []string `json:"providerIDList,omitempty"` - // FailureDomains is the list of failure domains this MachinePool should be attached to. + // failureDomains is the list of failure domains this MachinePool should be attached to. // +optional FailureDomains []string `json:"failureDomains,omitempty"` } @@ -68,11 +68,11 @@ type MachinePoolSpec struct { // MachinePoolStatus defines the observed state of MachinePool. type MachinePoolStatus struct { - // NodeRefs will point to the corresponding Nodes if it they exist. + // nodeRefs will point to the corresponding Nodes if it they exist. // +optional NodeRefs []corev1.ObjectReference `json:"nodeRefs,omitempty"` - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. // +optional Replicas int32 `json:"replicas"` @@ -92,34 +92,34 @@ type MachinePoolStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // FailureReason indicates that there is a problem reconciling the state, and + // failureReason indicates that there is a problem reconciling the state, and // will be set to a token value suitable for programmatic interpretation. // +optional FailureReason *capierrors.MachinePoolStatusFailure `json:"failureReason,omitempty"` - // FailureMessage indicates that there is a problem reconciling the state, + // failureMessage indicates that there is a problem reconciling the state, // and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Phase represents the current phase of cluster actuation. + // phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // BootstrapReady is the state of the bootstrap provider. + // bootstrapReady is the state of the bootstrap provider. // +optional BootstrapReady bool `json:"bootstrapReady"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions define the current service state of the MachinePool. + // conditions define the current service state of the MachinePool. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` diff --git a/exp/ipam/api/v1alpha1/ipaddress_types.go b/exp/ipam/api/v1alpha1/ipaddress_types.go index 172f2b7240d9..1ee18fadcb06 100644 --- a/exp/ipam/api/v1alpha1/ipaddress_types.go +++ b/exp/ipam/api/v1alpha1/ipaddress_types.go @@ -23,19 +23,19 @@ import ( // IPAddressSpec is the desired state of an IPAddress. type IPAddressSpec struct { - // ClaimRef is a reference to the claim this IPAddress was created for. + // claimRef is a reference to the claim this IPAddress was created for. ClaimRef corev1.LocalObjectReference `json:"claimRef"` - // PoolRef is a reference to the pool that this IPAddress was created from. + // poolRef is a reference to the pool that this IPAddress was created from. PoolRef corev1.TypedLocalObjectReference `json:"poolRef"` - // Address is the IP address. + // address is the IP address. Address string `json:"address"` - // Prefix is the prefix of the address. + // prefix is the prefix of the address. Prefix int `json:"prefix"` - // Gateway is the network gateway of the network the address is from. + // gateway is the network gateway of the network the address is from. // +optional Gateway string `json:"gateway,omitempty"` } diff --git a/exp/ipam/api/v1alpha1/ipaddressclaim_types.go b/exp/ipam/api/v1alpha1/ipaddressclaim_types.go index b66a8748d648..02eb49db4335 100644 --- a/exp/ipam/api/v1alpha1/ipaddressclaim_types.go +++ b/exp/ipam/api/v1alpha1/ipaddressclaim_types.go @@ -25,17 +25,17 @@ import ( // IPAddressClaimSpec is the desired state of an IPAddressClaim. type IPAddressClaimSpec struct { - // PoolRef is a reference to the pool from which an IP address should be created. + // poolRef is a reference to the pool from which an IP address should be created. PoolRef corev1.TypedLocalObjectReference `json:"poolRef"` } // IPAddressClaimStatus is the observed status of a IPAddressClaim. type IPAddressClaimStatus struct { - // AddressRef is a reference to the address that was created for this claim. + // addressRef is a reference to the address that was created for this claim. // +optional AddressRef corev1.LocalObjectReference `json:"addressRef,omitempty"` - // Conditions summarises the current state of the IPAddressClaim + // conditions summarises the current state of the IPAddressClaim // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` } diff --git a/exp/ipam/api/v1beta1/ipaddress_types.go b/exp/ipam/api/v1beta1/ipaddress_types.go index 4f37aad81c19..fd69f033f5b3 100644 --- a/exp/ipam/api/v1beta1/ipaddress_types.go +++ b/exp/ipam/api/v1beta1/ipaddress_types.go @@ -23,19 +23,19 @@ import ( // IPAddressSpec is the desired state of an IPAddress. type IPAddressSpec struct { - // ClaimRef is a reference to the claim this IPAddress was created for. + // claimRef is a reference to the claim this IPAddress was created for. ClaimRef corev1.LocalObjectReference `json:"claimRef"` - // PoolRef is a reference to the pool that this IPAddress was created from. + // poolRef is a reference to the pool that this IPAddress was created from. PoolRef corev1.TypedLocalObjectReference `json:"poolRef"` - // Address is the IP address. + // address is the IP address. Address string `json:"address"` - // Prefix is the prefix of the address. + // prefix is the prefix of the address. Prefix int `json:"prefix"` - // Gateway is the network gateway of the network the address is from. + // gateway is the network gateway of the network the address is from. // +optional Gateway string `json:"gateway,omitempty"` } diff --git a/exp/ipam/api/v1beta1/ipaddressclaim_types.go b/exp/ipam/api/v1beta1/ipaddressclaim_types.go index 99087db5603b..2e136196d1e5 100644 --- a/exp/ipam/api/v1beta1/ipaddressclaim_types.go +++ b/exp/ipam/api/v1beta1/ipaddressclaim_types.go @@ -25,21 +25,21 @@ import ( // IPAddressClaimSpec is the desired state of an IPAddressClaim. type IPAddressClaimSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +optional ClusterName string `json:"clusterName,omitempty"` - // PoolRef is a reference to the pool from which an IP address should be created. + // poolRef is a reference to the pool from which an IP address should be created. PoolRef corev1.TypedLocalObjectReference `json:"poolRef"` } // IPAddressClaimStatus is the observed status of a IPAddressClaim. type IPAddressClaimStatus struct { - // AddressRef is a reference to the address that was created for this claim. + // addressRef is a reference to the address that was created for this claim. // +optional AddressRef corev1.LocalObjectReference `json:"addressRef,omitempty"` - // Conditions summarises the current state of the IPAddressClaim + // conditions summarises the current state of the IPAddressClaim // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` } diff --git a/exp/runtime/api/v1alpha1/extensionconfig_types.go b/exp/runtime/api/v1alpha1/extensionconfig_types.go index bd8c3e5d0620..34855080b018 100644 --- a/exp/runtime/api/v1alpha1/extensionconfig_types.go +++ b/exp/runtime/api/v1alpha1/extensionconfig_types.go @@ -26,16 +26,16 @@ import ( // ExtensionConfigSpec defines the desired state of ExtensionConfig. type ExtensionConfigSpec struct { - // ClientConfig defines how to communicate with the Extension server. + // clientConfig defines how to communicate with the Extension server. ClientConfig ClientConfig `json:"clientConfig"` - // NamespaceSelector decides whether to call the hook for an object based + // namespaceSelector decides whether to call the hook for an object based // on whether the namespace for that object matches the selector. // Defaults to the empty LabelSelector, which matches all objects. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` - // Settings defines key value pairs to be passed to all calls + // settings defines key value pairs to be passed to all calls // to all supported RuntimeExtensions. // Note: Settings can be overridden on the ClusterClass. // +optional @@ -45,7 +45,7 @@ type ExtensionConfigSpec struct { // ClientConfig contains the information to make a client // connection with an Extension server. type ClientConfig struct { - // URL gives the location of the Extension server, in standard URL form + // url gives the location of the Extension server, in standard URL form // (`scheme://host:port/path`). // Note: Exactly one of `url` or `service` must be specified. // @@ -64,7 +64,7 @@ type ClientConfig struct { // +optional URL *string `json:"url,omitempty"` - // Service is a reference to the Kubernetes service for the Extension server. + // service is a reference to the Kubernetes service for the Extension server. // Note: Exactly one of `url` or `service` must be specified. // // If the Extension server is running within a cluster, then you should use `service`. @@ -72,25 +72,25 @@ type ClientConfig struct { // +optional Service *ServiceReference `json:"service,omitempty"` - // CABundle is a PEM encoded CA bundle which will be used to validate the Extension server's server certificate. + // caBundle is a PEM encoded CA bundle which will be used to validate the Extension server's server certificate. // +optional CABundle []byte `json:"caBundle,omitempty"` } // ServiceReference holds a reference to a Kubernetes Service of an Extension server. type ServiceReference struct { - // Namespace is the namespace of the service. + // namespace is the namespace of the service. Namespace string `json:"namespace"` - // Name is the name of the service. + // name is the name of the service. Name string `json:"name"` - // Path is an optional URL path and if present may be any string permissible in + // path is an optional URL path and if present may be any string permissible in // a URL. If a path is set it will be used as prefix to the hook-specific path. // +optional Path *string `json:"path,omitempty"` - // Port is the port on the service that's hosting the Extension server. + // port is the port on the service that's hosting the Extension server. // Defaults to 443. // Port should be a valid port number (1-65535, inclusive). // +optional @@ -103,31 +103,31 @@ type ServiceReference struct { // ExtensionConfigStatus defines the observed state of ExtensionConfig. type ExtensionConfigStatus struct { - // Handlers defines the current ExtensionHandlers supported by an Extension. + // handlers defines the current ExtensionHandlers supported by an Extension. // +optional // +listType=map // +listMapKey=name Handlers []ExtensionHandler `json:"handlers,omitempty"` - // Conditions define the current service state of the ExtensionConfig. + // conditions define the current service state of the ExtensionConfig. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` } // ExtensionHandler specifies the details of a handler for a particular runtime hook registered by an Extension server. type ExtensionHandler struct { - // Name is the unique name of the ExtensionHandler. + // name is the unique name of the ExtensionHandler. Name string `json:"name"` - // RequestHook defines the versioned runtime hook which this ExtensionHandler serves. + // requestHook defines the versioned runtime hook which this ExtensionHandler serves. RequestHook GroupVersionHook `json:"requestHook"` - // TimeoutSeconds defines the timeout duration for client calls to the ExtensionHandler. + // timeoutSeconds defines the timeout duration for client calls to the ExtensionHandler. // Defaults to 10 is not set. // +optional TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - // FailurePolicy defines how failures in calls to the ExtensionHandler should be handled by a client. + // failurePolicy defines how failures in calls to the ExtensionHandler should be handled by a client. // Defaults to Fail if not set. // +optional FailurePolicy *FailurePolicy `json:"failurePolicy,omitempty"` @@ -135,10 +135,10 @@ type ExtensionHandler struct { // GroupVersionHook defines the runtime hook when the ExtensionHandler is called. type GroupVersionHook struct { - // APIVersion is the group and version of the Hook. + // apiVersion is the group and version of the Hook. APIVersion string `json:"apiVersion"` - // Hook is the name of the hook. + // hook is the name of the hook. Hook string `json:"hook"` } diff --git a/exp/runtime/hooks/api/v1alpha1/common_types.go b/exp/runtime/hooks/api/v1alpha1/common_types.go index 97f90c4bf1a9..f7856a436ad1 100644 --- a/exp/runtime/hooks/api/v1alpha1/common_types.go +++ b/exp/runtime/hooks/api/v1alpha1/common_types.go @@ -32,7 +32,7 @@ type RequestObject interface { // Note: By embedding CommonRequest in a runtime.Object the RequestObject // interface is satisfied. type CommonRequest struct { - // Settings defines key value pairs to be passed to the call. + // settings defines key value pairs to be passed to the call. // +optional Settings map[string]string `json:"settings,omitempty"` } @@ -70,7 +70,7 @@ type RetryResponseObject interface { // Note: By embedding CommonResponse in a runtime.Object the ResponseObject // interface is satisfied. type CommonResponse struct { - // Status of the call. One of "Success" or "Failure". + // status of the call. One of "Success" or "Failure". Status ResponseStatus `json:"status"` // A human-readable description of the status of the call. @@ -117,7 +117,7 @@ type CommonRetryResponse struct { // CommonResponse contains Status and Message fields common to all response types. CommonResponse `json:",inline"` - // RetryAfterSeconds when set to a non-zero value signifies that the hook + // retryAfterSeconds when set to a non-zero value signifies that the hook // will be called again at a future time. RetryAfterSeconds int32 `json:"retryAfterSeconds"` } diff --git a/exp/runtime/hooks/api/v1alpha1/discovery_types.go b/exp/runtime/hooks/api/v1alpha1/discovery_types.go index 840dd2986061..61d0ac395505 100644 --- a/exp/runtime/hooks/api/v1alpha1/discovery_types.go +++ b/exp/runtime/hooks/api/v1alpha1/discovery_types.go @@ -41,7 +41,7 @@ type DiscoveryResponse struct { // CommonResponse contains Status and Message fields common to all response types. CommonResponse `json:",inline"` - // Handlers defines the current ExtensionHandlers supported by an Extension. + // handlers defines the current ExtensionHandlers supported by an Extension. // +listType=map // +listMapKey=name Handlers []ExtensionHandler `json:"handlers"` @@ -50,27 +50,27 @@ type DiscoveryResponse struct { // ExtensionHandler represents the discovery information for an extension handler which includes // the hook it supports. type ExtensionHandler struct { - // Name is the name of the ExtensionHandler. + // name is the name of the ExtensionHandler. Name string `json:"name"` - // RequestHook defines the versioned runtime hook which this ExtensionHandler serves. + // requestHook defines the versioned runtime hook which this ExtensionHandler serves. RequestHook GroupVersionHook `json:"requestHook"` - // TimeoutSeconds defines the timeout duration for client calls to the ExtensionHandler. + // timeoutSeconds defines the timeout duration for client calls to the ExtensionHandler. // This is defaulted to 10 if left undefined. TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - // FailurePolicy defines how failures in calls to the ExtensionHandler should be handled by a client. + // failurePolicy defines how failures in calls to the ExtensionHandler should be handled by a client. // This is defaulted to FailurePolicyFail if not defined. FailurePolicy *FailurePolicy `json:"failurePolicy,omitempty"` } // GroupVersionHook defines the runtime hook when the ExtensionHandler is called. type GroupVersionHook struct { - // APIVersion is the group and version of the Hook + // apiVersion is the group and version of the Hook APIVersion string `json:"apiVersion"` - // Hook is the name of the hook + // hook is the name of the hook Hook string `json:"hook"` } diff --git a/exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go b/exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go index 3293b10877b0..925e119969e2 100644 --- a/exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go +++ b/exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go @@ -31,7 +31,7 @@ type BeforeClusterCreateRequest struct { // CommonRequest contains fields common to all request types. CommonRequest `json:",inline"` - // Cluster is the cluster object the lifecycle hook corresponds to. + // cluster is the cluster object the lifecycle hook corresponds to. Cluster clusterv1.Cluster `json:"cluster"` } @@ -57,7 +57,7 @@ type AfterControlPlaneInitializedRequest struct { // CommonRequest contains fields common to all request types. CommonRequest `json:",inline"` - // Cluster is the cluster object the lifecycle hook corresponds to. + // cluster is the cluster object the lifecycle hook corresponds to. Cluster clusterv1.Cluster `json:"cluster"` } @@ -84,13 +84,13 @@ type BeforeClusterUpgradeRequest struct { // CommonRequest contains fields common to all request types. CommonRequest `json:",inline"` - // Cluster is the cluster object the lifecycle hook corresponds to. + // cluster is the cluster object the lifecycle hook corresponds to. Cluster clusterv1.Cluster `json:"cluster"` - // FromKubernetesVersion is the current Kubernetes version of the cluster. + // fromKubernetesVersion is the current Kubernetes version of the cluster. FromKubernetesVersion string `json:"fromKubernetesVersion"` - // ToKubernetesVersion is the target Kubernetes version of the upgrade. + // toKubernetesVersion is the target Kubernetes version of the upgrade. ToKubernetesVersion string `json:"toKubernetesVersion"` } @@ -117,10 +117,10 @@ type AfterControlPlaneUpgradeRequest struct { // CommonRequest contains fields common to all request types. CommonRequest `json:",inline"` - // Cluster is the cluster object the lifecycle hook corresponds to. + // cluster is the cluster object the lifecycle hook corresponds to. Cluster clusterv1.Cluster `json:"cluster"` - // KubernetesVersion is the Kubernetes version of the Control Plane after the upgrade. + // kubernetesVersion is the Kubernetes version of the Control Plane after the upgrade. KubernetesVersion string `json:"kubernetesVersion"` } @@ -147,10 +147,10 @@ type AfterClusterUpgradeRequest struct { // CommonRequest contains fields common to all request types. CommonRequest `json:",inline"` - // Cluster is the cluster object the lifecycle hook corresponds to. + // cluster is the cluster object the lifecycle hook corresponds to. Cluster clusterv1.Cluster `json:"cluster"` - // KubernetesVersion is the Kubernetes version after upgrade. + // kubernetesVersion is the Kubernetes version after upgrade. KubernetesVersion string `json:"kubernetesVersion"` } @@ -177,7 +177,7 @@ type BeforeClusterDeleteRequest struct { // CommonRequest contains fields common to all request types. CommonRequest `json:",inline"` - // Cluster is the cluster object the lifecycle hook corresponds to. + // cluster is the cluster object the lifecycle hook corresponds to. Cluster clusterv1.Cluster `json:"cluster"` } diff --git a/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go b/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go index 4a3f2fd0bf51..f9f2fbad63c5 100644 --- a/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go +++ b/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go @@ -34,26 +34,26 @@ type GeneratePatchesRequest struct { // CommonRequest contains Settings field common to all request types. CommonRequest `json:",inline"` - // Variables are global variables for all templates. + // variables are global variables for all templates. Variables []Variable `json:"variables"` - // Items is the list of templates to generate patches for. + // items is the list of templates to generate patches for. Items []GeneratePatchesRequestItem `json:"items"` } // GeneratePatchesRequestItem represents a template to generate patches for. type GeneratePatchesRequestItem struct { - // UID is an identifier for this template. It allows us to correlate the template in the request + // uid is an identifier for this template. It allows us to correlate the template in the request // with the corresponding generated patches in the response. UID types.UID `json:"uid"` - // HolderReference is a reference to the object where the template is used. + // holderReference is a reference to the object where the template is used. HolderReference HolderReference `json:"holderReference"` - // Object contains the template as a raw object. + // object contains the template as a raw object. Object runtime.RawExtension `json:"object"` - // Variables are variables specific for the current template. + // variables are variables specific for the current template. // For example some builtin variables like MachineDeployment replicas and version are context-sensitive // and thus are only added to templates for MachineDeployments and with values which correspond to the // current MachineDeployment. @@ -72,21 +72,21 @@ type GeneratePatchesResponse struct { // CommonResponse contains Status and Message fields common to all response types. CommonResponse `json:",inline"` - // Items is the list of generated patches. + // items is the list of generated patches. Items []GeneratePatchesResponseItem `json:"items"` } // GeneratePatchesResponseItem is a generated patch. type GeneratePatchesResponseItem struct { - // UID identifies the corresponding template in the request on which + // uid identifies the corresponding template in the request on which // the patch should be applied. UID types.UID `json:"uid"` - // PatchType defines the type of the patch. + // patchType defines the type of the patch. // One of: "JSONPatch" or "JSONMergePatch". PatchType PatchType `json:"patchType"` - // Patch contains the patch which should be applied to the template. + // patch contains the patch which should be applied to the template. // It must be of the corresponding PatchType. Patch []byte `json:"patch"` } @@ -114,22 +114,22 @@ type ValidateTopologyRequest struct { // CommonRequest contains Settings field common to all request types. CommonRequest `json:",inline"` - // Variables are global variables for all templates. + // variables are global variables for all templates. Variables []Variable `json:"variables"` - // Items is the list of templates to validate. + // items is the list of templates to validate. Items []*ValidateTopologyRequestItem `json:"items"` } // ValidateTopologyRequestItem represents a template to validate. type ValidateTopologyRequestItem struct { - // HolderReference is a reference to the object where the template is used. + // holderReference is a reference to the object where the template is used. HolderReference HolderReference `json:"holderReference"` - // Object contains the template as a raw object. + // object contains the template as a raw object. Object runtime.RawExtension `json:"object"` - // Variables are variables specific for the current template. + // variables are variables specific for the current template. // For example some builtin variables like MachineDeployment replicas and version are context-sensitive // and thus are only added to templates for MachineDeployments and with values which correspond to the // current MachineDeployment. @@ -149,10 +149,10 @@ type ValidateTopologyResponse struct { // Variable represents a variable value. type Variable struct { - // Name of the variable. + // name of the variable. Name string `json:"name"` - // Value of the variable. + // value of the variable. Value apiextensionsv1.JSON `json:"value"` } @@ -161,19 +161,19 @@ type HolderReference struct { // API version of the referent. APIVersion string `json:"apiVersion"` - // Kind of the referent. + // kind of the referent. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind"` - // Namespace of the referent. + // namespace of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ Namespace string `json:"namespace"` - // Name of the referent. + // name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names Name string `json:"name"` - // FieldPath is the path to the field of the object which references the template. + // fieldPath is the path to the field of the object which references the template. FieldPath string `json:"fieldPath"` } @@ -197,7 +197,7 @@ type DiscoverVariablesResponse struct { // CommonResponse contains Status and Message fields common to all response types. CommonResponse `json:",inline"` - // Variables are variable schemas for variables defined by the DiscoverVariables hook. + // variables are variable schemas for variables defined by the DiscoverVariables hook. Variables []clusterv1.ClusterClassVariable `json:"variables"` } diff --git a/exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go b/exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go index 33bbd916edef..5361c480cb26 100644 --- a/exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go +++ b/exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go @@ -35,42 +35,42 @@ type Builtins struct { // ClusterBuiltins represents builtin cluster variables. type ClusterBuiltins struct { - // Name is the name of the cluster. + // name is the name of the cluster. Name string `json:"name,omitempty"` - // Namespace is the namespace of the cluster. + // namespace is the namespace of the cluster. Namespace string `json:"namespace,omitempty"` - // UID is the unqiue identifier of the cluster. + // uid is the unqiue identifier of the cluster. UID types.UID `json:"uid,omitempty"` - // Topology represents the cluster topology variables. + // topology represents the cluster topology variables. Topology *ClusterTopologyBuiltins `json:"topology,omitempty"` - // Network represents the cluster network variables. + // network represents the cluster network variables. Network *ClusterNetworkBuiltins `json:"network,omitempty"` } // ClusterTopologyBuiltins represents builtin cluster topology variables. type ClusterTopologyBuiltins struct { - // Version is the Kubernetes version of the Cluster. + // version is the Kubernetes version of the Cluster. // NOTE: Please note that this version might temporarily differ from the version // of the ControlPlane or workers while an upgrade process is being orchestrated. Version string `json:"version,omitempty"` - // Class is the name of the ClusterClass of the Cluster. + // class is the name of the ClusterClass of the Cluster. Class string `json:"class,omitempty"` } // ClusterNetworkBuiltins represents builtin cluster network variables. type ClusterNetworkBuiltins struct { - // ServiceDomain is the domain name for services. + // serviceDomain is the domain name for services. ServiceDomain *string `json:"serviceDomain,omitempty"` - // Services is the network ranges from which service VIPs are allocated. + // services is the network ranges from which service VIPs are allocated. Services []string `json:"services,omitempty"` - // Pods is the network ranges from which Pod networks are allocated. + // pods is the network ranges from which Pod networks are allocated. Pods []string `json:"pods,omitempty"` - // IPFamily is the IPFamily the Cluster is operating in. One of Invalid, IPv4, IPv6, DualStack. + // ipFamily is the IPFamily the Cluster is operating in. One of Invalid, IPv4, IPv6, DualStack. // // Deprecated: IPFamily is not a concept in Kubernetes. It was originally introduced in CAPI for CAPD. // IPFamily will be dropped in a future release. More details at https://github.com/kubernetes-sigs/cluster-api/issues/7521 @@ -80,128 +80,128 @@ type ClusterNetworkBuiltins struct { // ControlPlaneBuiltins represents builtin ControlPlane variables. // NOTE: These variables are only set for templates belonging to the ControlPlane object. type ControlPlaneBuiltins struct { - // Version is the Kubernetes version of the ControlPlane object. + // version is the Kubernetes version of the ControlPlane object. // NOTE: Please note that this version is the version we are currently reconciling towards. // It can differ from the current version of the ControlPlane while an upgrade process is // being orchestrated. Version string `json:"version,omitempty"` - // Metadata is the metadata set on the ControlPlane object. + // metadata is the metadata set on the ControlPlane object. Metadata *clusterv1.ObjectMeta `json:"metadata,omitempty"` - // Name is the name of the ControlPlane, + // name is the name of the ControlPlane, // to which the current template belongs to. Name string `json:"name,omitempty"` - // Replicas is the value of the replicas field of the ControlPlane object. + // replicas is the value of the replicas field of the ControlPlane object. Replicas *int64 `json:"replicas,omitempty"` - // MachineTemplate is the value of the .spec.machineTemplate field of the ControlPlane object. + // machineTemplate is the value of the .spec.machineTemplate field of the ControlPlane object. MachineTemplate *ControlPlaneMachineTemplateBuiltins `json:"machineTemplate,omitempty"` } // ControlPlaneMachineTemplateBuiltins is the value of the .spec.machineTemplate field of the ControlPlane object. type ControlPlaneMachineTemplateBuiltins struct { - // InfrastructureRef is the value of the infrastructureRef field of ControlPlane.spec.machineTemplate. + // infrastructureRef is the value of the infrastructureRef field of ControlPlane.spec.machineTemplate. InfrastructureRef ControlPlaneMachineTemplateInfrastructureRefBuiltins `json:"infrastructureRef,omitempty"` } // ControlPlaneMachineTemplateInfrastructureRefBuiltins is the value of the infrastructureRef field of // ControlPlane.spec.machineTemplate. type ControlPlaneMachineTemplateInfrastructureRefBuiltins struct { - // Name of the infrastructureRef. + // name of the infrastructureRef. Name string `json:"name,omitempty"` } // MachineDeploymentBuiltins represents builtin MachineDeployment variables. // NOTE: These variables are only set for templates belonging to a MachineDeployment. type MachineDeploymentBuiltins struct { - // Version is the Kubernetes version of the MachineDeployment, + // version is the Kubernetes version of the MachineDeployment, // to which the current template belongs to. // NOTE: Please note that this version is the version we are currently reconciling towards. // It can differ from the current version of the MachineDeployment machines while an upgrade process is // being orchestrated. Version string `json:"version,omitempty"` - // Metadata is the metadata set on the MachineDeployment. + // metadata is the metadata set on the MachineDeployment. Metadata *clusterv1.ObjectMeta `json:"metadata,omitempty"` - // Class is the class name of the MachineDeployment, + // class is the class name of the MachineDeployment, // to which the current template belongs to. Class string `json:"class,omitempty"` - // Name is the name of the MachineDeployment, + // name is the name of the MachineDeployment, // to which the current template belongs to. Name string `json:"name,omitempty"` - // TopologyName is the topology name of the MachineDeployment, + // topologyName is the topology name of the MachineDeployment, // to which the current template belongs to. TopologyName string `json:"topologyName,omitempty"` - // Replicas is the value of the replicas field of the MachineDeployment, + // replicas is the value of the replicas field of the MachineDeployment, // to which the current template belongs to. Replicas *int64 `json:"replicas,omitempty"` - // Bootstrap is the value of the .spec.template.spec.bootstrap field of the MachineDeployment. + // bootstrap is the value of the .spec.template.spec.bootstrap field of the MachineDeployment. Bootstrap *MachineBootstrapBuiltins `json:"bootstrap,omitempty"` - // InfrastructureRef is the value of the .spec.template.spec.infrastructureRef field of the MachineDeployment. + // infrastructureRef is the value of the .spec.template.spec.infrastructureRef field of the MachineDeployment. InfrastructureRef *MachineInfrastructureRefBuiltins `json:"infrastructureRef,omitempty"` } // MachinePoolBuiltins represents builtin MachinePool variables. // NOTE: These variables are only set for templates belonging to a MachinePool. type MachinePoolBuiltins struct { - // Version is the Kubernetes version of the MachinePool, + // version is the Kubernetes version of the MachinePool, // to which the current template belongs to. // NOTE: Please note that this version is the version we are currently reconciling towards. // It can differ from the current version of the MachinePool machines while an upgrade process is // being orchestrated. Version string `json:"version,omitempty"` - // Metadata is the metadata set on the MachinePool. + // metadata is the metadata set on the MachinePool. Metadata *clusterv1.ObjectMeta `json:"metadata,omitempty"` - // Class is the class name of the MachinePool, + // class is the class name of the MachinePool, // to which the current template belongs to. Class string `json:"class,omitempty"` - // Name is the name of the MachinePool, + // name is the name of the MachinePool, // to which the current template belongs to. Name string `json:"name,omitempty"` - // TopologyName is the topology name of the MachinePool, + // topologyName is the topology name of the MachinePool, // to which the current template belongs to. TopologyName string `json:"topologyName,omitempty"` - // Replicas is the value of the replicas field of the MachinePool, + // replicas is the value of the replicas field of the MachinePool, // to which the current template belongs to. Replicas *int64 `json:"replicas,omitempty"` - // Bootstrap is the value of the .spec.template.spec.bootstrap field of the MachinePool. + // bootstrap is the value of the .spec.template.spec.bootstrap field of the MachinePool. Bootstrap *MachineBootstrapBuiltins `json:"bootstrap,omitempty"` - // InfrastructureRef is the value of the .spec.template.spec.infrastructureRef field of the MachinePool. + // infrastructureRef is the value of the .spec.template.spec.infrastructureRef field of the MachinePool. InfrastructureRef *MachineInfrastructureRefBuiltins `json:"infrastructureRef,omitempty"` } // MachineBootstrapBuiltins is the value of the .spec.template.spec.bootstrap field // of the MachineDeployment or MachinePool. type MachineBootstrapBuiltins struct { - // ConfigRef is the value of the .spec.template.spec.bootstrap.configRef field of the MachineDeployment. + // configRef is the value of the .spec.template.spec.bootstrap.configRef field of the MachineDeployment. ConfigRef *MachineBootstrapConfigRefBuiltins `json:"configRef,omitempty"` } // MachineBootstrapConfigRefBuiltins is the value of the .spec.template.spec.bootstrap.configRef // field of the MachineDeployment or MachinePool. type MachineBootstrapConfigRefBuiltins struct { - // Name of the bootstrap.configRef. + // name of the bootstrap.configRef. Name string `json:"name,omitempty"` } // MachineInfrastructureRefBuiltins is the value of the .spec.template.spec.infrastructureRef field // of the MachineDeployment or MachinePool. type MachineInfrastructureRefBuiltins struct { - // Name of the infrastructureRef. + // name of the infrastructureRef. Name string `json:"name,omitempty"` } diff --git a/internal/apis/bootstrap/kubeadm/v1alpha3/kubeadmconfig_types.go b/internal/apis/bootstrap/kubeadm/v1alpha3/kubeadmconfig_types.go index 194293985a72..234eb28489a3 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha3/kubeadmconfig_types.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha3/kubeadmconfig_types.go @@ -35,56 +35,56 @@ const ( // KubeadmConfigSpec defines the desired state of KubeadmConfig. // Either ClusterConfiguration and InitConfiguration should be defined or the JoinConfiguration should be defined. type KubeadmConfigSpec struct { - // ClusterConfiguration along with InitConfiguration are the configurations necessary for the init command + // clusterConfiguration along with InitConfiguration are the configurations necessary for the init command // +optional ClusterConfiguration *upstreamv1beta1.ClusterConfiguration `json:"clusterConfiguration,omitempty"` - // InitConfiguration along with ClusterConfiguration are the configurations necessary for the init command + // initConfiguration along with ClusterConfiguration are the configurations necessary for the init command // +optional InitConfiguration *upstreamv1beta1.InitConfiguration `json:"initConfiguration,omitempty"` - // JoinConfiguration is the kubeadm configuration for the join command + // joinConfiguration is the kubeadm configuration for the join command // +optional JoinConfiguration *upstreamv1beta1.JoinConfiguration `json:"joinConfiguration,omitempty"` - // Files specifies extra files to be passed to user_data upon creation. + // files specifies extra files to be passed to user_data upon creation. // +optional Files []File `json:"files,omitempty"` - // DiskSetup specifies options for the creation of partition tables and file systems on devices. + // diskSetup specifies options for the creation of partition tables and file systems on devices. // +optional DiskSetup *DiskSetup `json:"diskSetup,omitempty"` - // Mounts specifies a list of mount points to be setup. + // mounts specifies a list of mount points to be setup. // +optional Mounts []MountPoints `json:"mounts,omitempty"` - // PreKubeadmCommands specifies extra commands to run before kubeadm runs + // preKubeadmCommands specifies extra commands to run before kubeadm runs // +optional PreKubeadmCommands []string `json:"preKubeadmCommands,omitempty"` - // PostKubeadmCommands specifies extra commands to run after kubeadm runs + // postKubeadmCommands specifies extra commands to run after kubeadm runs // +optional PostKubeadmCommands []string `json:"postKubeadmCommands,omitempty"` - // Users specifies extra users to add + // users specifies extra users to add // +optional Users []User `json:"users,omitempty"` - // NTP specifies NTP configuration + // ntp specifies NTP configuration // +optional NTP *NTP `json:"ntp,omitempty"` - // Format specifies the output format of the bootstrap data + // format specifies the output format of the bootstrap data // +optional Format Format `json:"format,omitempty"` - // Verbosity is the number for the kubeadm log level verbosity. + // verbosity is the number for the kubeadm log level verbosity. // It overrides the `--v` flag in kubeadm commands. // +optional Verbosity *int32 `json:"verbosity,omitempty"` - // UseExperimentalRetryJoin replaces a basic kubeadm command with a shell + // useExperimentalRetryJoin replaces a basic kubeadm command with a shell // script with retries for joins. // // This is meant to be an experimental temporary workaround on some environments @@ -100,33 +100,33 @@ type KubeadmConfigSpec struct { // KubeadmConfigStatus defines the observed state of KubeadmConfig. type KubeadmConfigStatus struct { - // Ready indicates the BootstrapData field is ready to be consumed + // ready indicates the BootstrapData field is ready to be consumed Ready bool `json:"ready,omitempty"` - // DataSecretName is the name of the secret that stores the bootstrap data script. + // dataSecretName is the name of the secret that stores the bootstrap data script. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` - // BootstrapData will be a cloud-init script for now. + // bootstrapData will be a cloud-init script for now. // // Deprecated: Switch to DataSecretName. // // +optional BootstrapData []byte `json:"bootstrapData,omitempty"` - // FailureReason will be set on non-retryable errors + // failureReason will be set on non-retryable errors // +optional FailureReason string `json:"failureReason,omitempty"` - // FailureMessage will be set on non-retryable errors + // failureMessage will be set on non-retryable errors // +optional FailureMessage string `json:"failureMessage,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the KubeadmConfig. + // conditions defines current service state of the KubeadmConfig. // +optional Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` } @@ -188,26 +188,26 @@ const ( // File defines the input for generating write_files in cloud-init. type File struct { - // Path specifies the full path on disk where to store the file. + // path specifies the full path on disk where to store the file. Path string `json:"path"` - // Owner specifies the ownership of the file, e.g. "root:root". + // owner specifies the ownership of the file, e.g. "root:root". // +optional Owner string `json:"owner,omitempty"` - // Permissions specifies the permissions to assign to the file, e.g. "0640". + // permissions specifies the permissions to assign to the file, e.g. "0640". // +optional Permissions string `json:"permissions,omitempty"` - // Encoding specifies the encoding of the file contents. + // encoding specifies the encoding of the file contents. // +optional Encoding Encoding `json:"encoding,omitempty"` - // Content is the actual content of the file. + // content is the actual content of the file. // +optional Content string `json:"content,omitempty"` - // ContentFrom is a referenced source of content to populate the file. + // contentFrom is a referenced source of content to populate the file. // +optional ContentFrom *FileSource `json:"contentFrom,omitempty"` } @@ -216,7 +216,7 @@ type File struct { // Only one field may be populated in any given instance. Developers adding new // sources of data for target systems should add them here. type FileSource struct { - // Secret represents a secret that should populate this file. + // secret represents a secret that should populate this file. Secret SecretFileSource `json:"secret"` } @@ -225,91 +225,91 @@ type FileSource struct { // The contents of the target Secret's Data field will be presented // as files using the keys in the Data field as the file names. type SecretFileSource struct { - // Name of the secret in the KubeadmBootstrapConfig's namespace to use. + // name of the secret in the KubeadmBootstrapConfig's namespace to use. Name string `json:"name"` - // Key is the key in the secret's data map for this value. + // key is the key in the secret's data map for this value. Key string `json:"key"` } // User defines the input for a generated user in cloud-init. type User struct { - // Name specifies the user name + // name specifies the user name Name string `json:"name"` - // Gecos specifies the gecos to use for the user + // gecos specifies the gecos to use for the user // +optional Gecos *string `json:"gecos,omitempty"` - // Groups specifies the additional groups for the user + // groups specifies the additional groups for the user // +optional Groups *string `json:"groups,omitempty"` - // HomeDir specifies the home directory to use for the user + // homeDir specifies the home directory to use for the user // +optional HomeDir *string `json:"homeDir,omitempty"` - // Inactive specifies whether to mark the user as inactive + // inactive specifies whether to mark the user as inactive // +optional Inactive *bool `json:"inactive,omitempty"` - // Shell specifies the user's shell + // shell specifies the user's shell // +optional Shell *string `json:"shell,omitempty"` - // Passwd specifies a hashed password for the user + // passwd specifies a hashed password for the user // +optional Passwd *string `json:"passwd,omitempty"` - // PrimaryGroup specifies the primary group for the user + // primaryGroup specifies the primary group for the user // +optional PrimaryGroup *string `json:"primaryGroup,omitempty"` - // LockPassword specifies if password login should be disabled + // lockPassword specifies if password login should be disabled // +optional LockPassword *bool `json:"lockPassword,omitempty"` - // Sudo specifies a sudo role for the user + // sudo specifies a sudo role for the user // +optional Sudo *string `json:"sudo,omitempty"` - // SSHAuthorizedKeys specifies a list of ssh authorized keys for the user + // sshAuthorizedKeys specifies a list of ssh authorized keys for the user // +optional SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` } // NTP defines input for generated ntp in cloud-init. type NTP struct { - // Servers specifies which NTP servers to use + // servers specifies which NTP servers to use // +optional Servers []string `json:"servers,omitempty"` - // Enabled specifies whether NTP should be enabled + // enabled specifies whether NTP should be enabled // +optional Enabled *bool `json:"enabled,omitempty"` } // DiskSetup defines input for generated disk_setup and fs_setup in cloud-init. type DiskSetup struct { - // Partitions specifies the list of the partitions to setup. + // partitions specifies the list of the partitions to setup. Partitions []Partition `json:"partitions,omitempty"` - // Filesystems specifies the list of file systems to setup. + // filesystems specifies the list of file systems to setup. Filesystems []Filesystem `json:"filesystems,omitempty"` } // Partition defines how to create and layout a partition. type Partition struct { - // Device is the name of the device. + // device is the name of the device. Device string `json:"device"` - // Layout specifies the device layout. + // layout specifies the device layout. // If it is true, a single partition will be created for the entire device. // When layout is false, it means don't partition or ignore existing partitioning. Layout bool `json:"layout"` - // Overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. + // overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. // Use with caution. Default is 'false'. // +optional Overwrite *bool `json:"overwrite,omitempty"` - // TableType specifies the tupe of partition table. The following are supported: + // tableType specifies the tupe of partition table. The following are supported: // 'mbr': default and setups a MS-DOS partition table // 'gpt': setups a GPT partition table // +optional @@ -318,24 +318,24 @@ type Partition struct { // Filesystem defines the file systems to be created. type Filesystem struct { - // Device specifies the device name + // device specifies the device name Device string `json:"device"` - // Filesystem specifies the file system type. + // filesystem specifies the file system type. Filesystem string `json:"filesystem"` - // Label specifies the file system label to be used. If set to None, no label is used. + // label specifies the file system label to be used. If set to None, no label is used. Label string `json:"label"` - // Partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. + // partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. // +optional Partition *string `json:"partition,omitempty"` - // Overwrite defines whether or not to overwrite any existing filesystem. + // overwrite defines whether or not to overwrite any existing filesystem. // If true, any pre-existing file system will be destroyed. Use with Caution. // +optional Overwrite *bool `json:"overwrite,omitempty"` - // ReplaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . + // replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . // NOTE: unless you define a label, this requires the use of the 'any' partition directive. // +optional ReplaceFS *string `json:"replaceFS,omitempty"` - // ExtraOpts defined extra options to add to the command for creating the file system. + // extraOpts defined extra options to add to the command for creating the file system. // +optional ExtraOpts []string `json:"extraOpts,omitempty"` } diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go index a580bb0a7137..0479d76bf4b8 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadm_types.go @@ -34,18 +34,18 @@ import ( type InitConfiguration struct { metav1.TypeMeta `json:",inline"` - // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature // +optional BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible @@ -61,22 +61,22 @@ type InitConfiguration struct { type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` - // Etcd holds configuration for etcd. + // etcd holds configuration for etcd. // NB: This value defaults to a Local (stacked) etcd // +optional Etcd Etcd `json:"etcd,omitempty"` - // Networking holds configuration for the networking topology of the cluster. + // networking holds configuration for the networking topology of the cluster. // NB: This value defaults to the Cluster object spec.clusterNetwork. // +optional Networking Networking `json:"networking,omitempty"` - // KubernetesVersion is the target version of the control plane. + // kubernetesVersion is the target version of the control plane. // NB: This value defaults to the Machine object spec.version // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, @@ -91,35 +91,35 @@ type ClusterConfiguration struct { // +optional ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` - // APIServer contains extra settings for the API server control plane component + // apiServer contains extra settings for the API server control plane component // +optional APIServer APIServer `json:"apiServer,omitempty"` - // ControllerManager contains extra settings for the controller manager control plane component + // controllerManager contains extra settings for the controller manager control plane component // +optional ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` - // Scheduler contains extra settings for the scheduler control plane component + // scheduler contains extra settings for the scheduler control plane component // +optional Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` - // DNS defines the options for the DNS add-on installed in the cluster. + // dns defines the options for the DNS add-on installed in the cluster. // +optional DNS DNS `json:"dns,omitempty"` - // CertificatesDir specifies where to store or look for all required certificates. + // certificatesDir specifies where to store or look for all required certificates. // NB: if not provided, this will default to `/etc/kubernetes/pki` // +optional CertificatesDir string `json:"certificatesDir,omitempty"` - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // If empty, `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `registry.k8s.io` // will be used for all the other images. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // FeatureGates enabled by the user. + // featureGates enabled by the user. // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` @@ -130,12 +130,12 @@ type ClusterConfiguration struct { // ControlPlaneComponent holds settings common to control plane component of the cluster. type ControlPlaneComponent struct { - // ExtraArgs is an extra set of flags to pass to the control plane component. + // extraArgs is an extra set of flags to pass to the control plane component. // TODO: This is temporary and ideally we would like to switch all components to use ComponentConfig + ConfigMaps. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // extraVolumes is an extra set of host volumes, mounted to the control plane component. // +optional ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` } @@ -144,11 +144,11 @@ type ControlPlaneComponent struct { type APIServer struct { ControlPlaneComponent `json:",inline"` - // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // certSANs sets extra Subject Alternative Names for the API Server signing cert. // +optional CertSANs []string `json:"certSANs,omitempty"` - // TimeoutForControlPlane controls the timeout that we use for API server to appear + // timeoutForControlPlane controls the timeout that we use for API server to appear // +optional TimeoutForControlPlane *metav1.Duration `json:"timeoutForControlPlane,omitempty"` } @@ -162,12 +162,12 @@ type DNS struct { // ImageMeta allows to customize the image used for components that are not // originated from the Kubernetes/Kubernetes release process. type ImageMeta struct { - // ImageRepository sets the container registry to pull images from. + // imageRepository sets the container registry to pull images from. // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. // +optional ImageRepository string `json:"imageRepository,omitempty"` - // ImageTag allows to specify a tag for the image. + // imageTag allows to specify a tag for the image. // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. // +optional ImageTag string `json:"imageTag,omitempty"` @@ -185,18 +185,18 @@ type ImageMeta struct { type ClusterStatus struct { metav1.TypeMeta `json:",inline"` - // APIEndpoints currently available in the cluster, one for each control plane/api server instance. + // apiEndpoints currently available in the cluster, one for each control plane/api server instance. // The key of the map is the IP of the host's default interface APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"` } // APIEndpoint struct contains elements of API server instance deployed on a node. type APIEndpoint struct { - // AdvertiseAddress sets the IP address for the API server to advertise. + // advertiseAddress sets the IP address for the API server to advertise. // +optional AdvertiseAddress string `json:"advertiseAddress,omitempty"` - // BindPort sets the secure port for the API Server to bind to. + // bindPort sets the secure port for the API Server to bind to. // Defaults to 6443. // +optional BindPort int32 `json:"bindPort,omitempty"` @@ -205,71 +205,71 @@ type APIEndpoint struct { // NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join". type NodeRegistrationOptions struct { - // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. // This field is also used in the CommonName field of the kubelet's client certificate to the API server. // Defaults to the hostname of the node if not provided. // +optional Name string `json:"name,omitempty"` - // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use // +optional CRISocket string `json:"criSocket,omitempty"` - // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + // taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process // it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an // empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. Taints []corev1.Taint `json:"taints,omitempty"` - // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. // +optional KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"` - // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. + // ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. // +optional IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` } // Networking contains elements describing cluster's networking configuration. type Networking struct { - // ServiceSubnet is the subnet used by k8s services. + // serviceSubnet is the subnet used by k8s services. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or // to "10.96.0.0/12" if that's unset. // +optional ServiceSubnet string `json:"serviceSubnet,omitempty"` - // PodSubnet is the subnet used by pods. + // podSubnet is the subnet used by pods. // If unset, the API server will not allocate CIDR ranges for every node. // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set // +optional PodSubnet string `json:"podSubnet,omitempty"` - // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local". // +optional DNSDomain string `json:"dnsDomain,omitempty"` } // BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. type BootstrapToken struct { - // Token is used for establishing bidirectional trust between nodes and control-planes. + // token is used for establishing bidirectional trust between nodes and control-planes. // Used for joining nodes in the cluster. Token *BootstrapTokenString `json:"token"` - // Description sets a human-friendly message why this token exists and what it's used + // description sets a human-friendly message why this token exists and what it's used // for, so other administrators can know its purpose. // +optional Description string `json:"description,omitempty"` - // TTL defines the time to live for this token. Defaults to 24h. + // ttl defines the time to live for this token. Defaults to 24h. // Expires and TTL are mutually exclusive. // +optional TTL *metav1.Duration `json:"ttl,omitempty"` - // Expires specifies the timestamp when this token expires. Defaults to being set + // expires specifies the timestamp when this token expires. Defaults to being set // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. // +optional Expires *metav1.Time `json:"expires,omitempty"` - // Usages describes the ways in which this token can be used. Can by default be used + // usages describes the ways in which this token can be used. Can by default be used // for establishing bidirectional trust, but that can be changed here. // +optional Usages []string `json:"usages,omitempty"` - // Groups specifies the extra groups that this token will authenticate as when/if + // groups specifies the extra groups that this token will authenticate as when/if // used for authentication // +optional Groups []string `json:"groups,omitempty"` @@ -278,12 +278,12 @@ type BootstrapToken struct { // Etcd contains elements describing Etcd configuration. type Etcd struct { - // Local provides configuration knobs for configuring the local etcd instance + // local provides configuration knobs for configuring the local etcd instance // Local and External are mutually exclusive // +optional Local *LocalEtcd `json:"local,omitempty"` - // External describes how to connect to an external etcd cluster + // external describes how to connect to an external etcd cluster // Local and External are mutually exclusive // +optional External *ExternalEtcd `json:"external,omitempty"` @@ -294,20 +294,20 @@ type LocalEtcd struct { // ImageMeta allows to customize the container used for etcd ImageMeta `json:",inline"` - // DataDir is the directory etcd will place its data. + // dataDir is the directory etcd will place its data. // Defaults to "/var/lib/etcd". // +optional DataDir string `json:"dataDir,omitempty"` - // ExtraArgs are extra arguments provided to the etcd binary + // extraArgs are extra arguments provided to the etcd binary // when run inside a static pod. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` - // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert. // +optional ServerCertSANs []string `json:"serverCertSANs,omitempty"` - // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. // +optional PeerCertSANs []string `json:"peerCertSANs,omitempty"` } @@ -315,18 +315,18 @@ type LocalEtcd struct { // ExternalEtcd describes an external etcd cluster. // Kubeadm has no knowledge of where certificate files live and they must be supplied. type ExternalEtcd struct { - // Endpoints of etcd members. Required for ExternalEtcd. + // endpoints of etcd members. Required for ExternalEtcd. Endpoints []string `json:"endpoints"` - // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // caFile is an SSL Certificate Authority file used to secure etcd communication. // Required if using a TLS connection. CAFile string `json:"caFile"` - // CertFile is an SSL certification file used to secure etcd communication. + // certFile is an SSL certification file used to secure etcd communication. // Required if using a TLS connection. CertFile string `json:"certFile"` - // KeyFile is an SSL key file used to secure etcd communication. + // keyFile is an SSL key file used to secure etcd communication. // Required if using a TLS connection. KeyFile string `json:"keyFile"` } @@ -337,25 +337,25 @@ type ExternalEtcd struct { type JoinConfiguration struct { metav1.TypeMeta `json:",inline"` - // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. // When used in the context of control plane nodes, NodeRegistration should remain consistent // across both InitConfiguration and JoinConfiguration // +optional NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` - // CACertPath is the path to the SSL certificate authority used to + // caCertPath is the path to the SSL certificate authority used to // secure comunications between node and control-plane. // Defaults to "/etc/kubernetes/pki/ca.crt". // +optional // TODO: revisit when there is defaulting from k/k CACertPath string `json:"caCertPath,omitempty"` - // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // discovery specifies the options for the kubelet to use during the TLS Bootstrap process // +optional // TODO: revisit when there is defaulting from k/k Discovery Discovery `json:"discovery,omitempty"` - // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // controlPlane defines the additional control plane instance to be deployed on the joining node. // If nil, no additional control plane instance will be deployed. // +optional ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` @@ -363,45 +363,45 @@ type JoinConfiguration struct { // JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. type JoinControlPlane struct { - // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. // +optional LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` } // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. type Discovery struct { - // BootstrapToken is used to set the options for bootstrap token based discovery + // bootstrapToken is used to set the options for bootstrap token based discovery // BootstrapToken and File are mutually exclusive // +optional BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` - // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // file is used to specify a file or URL to a kubeconfig file from which to load cluster information // BootstrapToken and File are mutually exclusive // +optional File *FileDiscovery `json:"file,omitempty"` - // TLSBootstrapToken is a token used for TLS bootstrapping. + // tlsBootstrapToken is a token used for TLS bootstrapping. // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information // +optional TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty"` - // Timeout modifies the discovery timeout + // timeout modifies the discovery timeout // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` } // BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. type BootstrapTokenDiscovery struct { - // Token is a token used to validate cluster information + // token is a token used to validate cluster information // fetched from the control-plane. Token string `json:"token"` - // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // apiServerEndpoint is an IP or domain name to the API server from which info will be fetched. // +optional APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` - // CACertHashes specifies a set of public key pins to verify + // caCertHashes specifies a set of public key pins to verify // when token-based discovery is used. The root CA found during discovery // must match one of these values. Specifying an empty set disables root CA // pinning, which can be unsafe. Each hash is specified as ":", @@ -412,7 +412,7 @@ type BootstrapTokenDiscovery struct { // +optional CACertHashes []string `json:"caCertHashes,omitempty"` - // UnsafeSkipCAVerification allows token-based discovery + // unsafeSkipCAVerification allows token-based discovery // without CA verification via CACertHashes. This can weaken // the security of kubeadm since other nodes can impersonate the control-plane. // +optional @@ -421,24 +421,24 @@ type BootstrapTokenDiscovery struct { // FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. type FileDiscovery struct { - // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + // kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information KubeConfigPath string `json:"kubeConfigPath"` } // HostPathMount contains elements describing volumes that are mounted from the // host. type HostPathMount struct { - // Name of the volume inside the pod template. + // name of the volume inside the pod template. Name string `json:"name"` - // HostPath is the path in the host that will be mounted inside + // hostPath is the path in the host that will be mounted inside // the pod. HostPath string `json:"hostPath"` - // MountPath is the path inside the pod where hostPath will be mounted. + // mountPath is the path inside the pod where hostPath will be mounted. MountPath string `json:"mountPath"` - // ReadOnly controls write access to the volume + // readOnly controls write access to the volume // +optional ReadOnly bool `json:"readOnly,omitempty"` - // PathType is the type of the HostPath. + // pathType is the type of the HostPath. // +optional PathType corev1.HostPathType `json:"pathType,omitempty"` } diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go index 64425edf63d6..9f823e17a86f 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/kubeadmconfig_types.go @@ -34,56 +34,56 @@ const ( // KubeadmConfigSpec defines the desired state of KubeadmConfig. // Either ClusterConfiguration and InitConfiguration should be defined or the JoinConfiguration should be defined. type KubeadmConfigSpec struct { - // ClusterConfiguration along with InitConfiguration are the configurations necessary for the init command + // clusterConfiguration along with InitConfiguration are the configurations necessary for the init command // +optional ClusterConfiguration *ClusterConfiguration `json:"clusterConfiguration,omitempty"` - // InitConfiguration along with ClusterConfiguration are the configurations necessary for the init command + // initConfiguration along with ClusterConfiguration are the configurations necessary for the init command // +optional InitConfiguration *InitConfiguration `json:"initConfiguration,omitempty"` - // JoinConfiguration is the kubeadm configuration for the join command + // joinConfiguration is the kubeadm configuration for the join command // +optional JoinConfiguration *JoinConfiguration `json:"joinConfiguration,omitempty"` - // Files specifies extra files to be passed to user_data upon creation. + // files specifies extra files to be passed to user_data upon creation. // +optional Files []File `json:"files,omitempty"` - // DiskSetup specifies options for the creation of partition tables and file systems on devices. + // diskSetup specifies options for the creation of partition tables and file systems on devices. // +optional DiskSetup *DiskSetup `json:"diskSetup,omitempty"` - // Mounts specifies a list of mount points to be setup. + // mounts specifies a list of mount points to be setup. // +optional Mounts []MountPoints `json:"mounts,omitempty"` - // PreKubeadmCommands specifies extra commands to run before kubeadm runs + // preKubeadmCommands specifies extra commands to run before kubeadm runs // +optional PreKubeadmCommands []string `json:"preKubeadmCommands,omitempty"` - // PostKubeadmCommands specifies extra commands to run after kubeadm runs + // postKubeadmCommands specifies extra commands to run after kubeadm runs // +optional PostKubeadmCommands []string `json:"postKubeadmCommands,omitempty"` - // Users specifies extra users to add + // users specifies extra users to add // +optional Users []User `json:"users,omitempty"` - // NTP specifies NTP configuration + // ntp specifies NTP configuration // +optional NTP *NTP `json:"ntp,omitempty"` - // Format specifies the output format of the bootstrap data + // format specifies the output format of the bootstrap data // +optional Format Format `json:"format,omitempty"` - // Verbosity is the number for the kubeadm log level verbosity. + // verbosity is the number for the kubeadm log level verbosity. // It overrides the `--v` flag in kubeadm commands. // +optional Verbosity *int32 `json:"verbosity,omitempty"` - // UseExperimentalRetryJoin replaces a basic kubeadm command with a shell + // useExperimentalRetryJoin replaces a basic kubeadm command with a shell // script with retries for joins. // // This is meant to be an experimental temporary workaround on some environments @@ -99,26 +99,26 @@ type KubeadmConfigSpec struct { // KubeadmConfigStatus defines the observed state of KubeadmConfig. type KubeadmConfigStatus struct { - // Ready indicates the BootstrapData field is ready to be consumed + // ready indicates the BootstrapData field is ready to be consumed Ready bool `json:"ready,omitempty"` - // DataSecretName is the name of the secret that stores the bootstrap data script. + // dataSecretName is the name of the secret that stores the bootstrap data script. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` - // FailureReason will be set on non-retryable errors + // failureReason will be set on non-retryable errors // +optional FailureReason string `json:"failureReason,omitempty"` - // FailureMessage will be set on non-retryable errors + // failureMessage will be set on non-retryable errors // +optional FailureMessage string `json:"failureMessage,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the KubeadmConfig. + // conditions defines current service state of the KubeadmConfig. // +optional Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` } @@ -181,26 +181,26 @@ const ( // File defines the input for generating write_files in cloud-init. type File struct { - // Path specifies the full path on disk where to store the file. + // path specifies the full path on disk where to store the file. Path string `json:"path"` - // Owner specifies the ownership of the file, e.g. "root:root". + // owner specifies the ownership of the file, e.g. "root:root". // +optional Owner string `json:"owner,omitempty"` - // Permissions specifies the permissions to assign to the file, e.g. "0640". + // permissions specifies the permissions to assign to the file, e.g. "0640". // +optional Permissions string `json:"permissions,omitempty"` - // Encoding specifies the encoding of the file contents. + // encoding specifies the encoding of the file contents. // +optional Encoding Encoding `json:"encoding,omitempty"` - // Content is the actual content of the file. + // content is the actual content of the file. // +optional Content string `json:"content,omitempty"` - // ContentFrom is a referenced source of content to populate the file. + // contentFrom is a referenced source of content to populate the file. // +optional ContentFrom *FileSource `json:"contentFrom,omitempty"` } @@ -209,7 +209,7 @@ type File struct { // Only one field may be populated in any given instance. Developers adding new // sources of data for target systems should add them here. type FileSource struct { - // Secret represents a secret that should populate this file. + // secret represents a secret that should populate this file. Secret SecretFileSource `json:"secret"` } @@ -218,91 +218,91 @@ type FileSource struct { // The contents of the target Secret's Data field will be presented // as files using the keys in the Data field as the file names. type SecretFileSource struct { - // Name of the secret in the KubeadmBootstrapConfig's namespace to use. + // name of the secret in the KubeadmBootstrapConfig's namespace to use. Name string `json:"name"` - // Key is the key in the secret's data map for this value. + // key is the key in the secret's data map for this value. Key string `json:"key"` } // User defines the input for a generated user in cloud-init. type User struct { - // Name specifies the user name + // name specifies the user name Name string `json:"name"` - // Gecos specifies the gecos to use for the user + // gecos specifies the gecos to use for the user // +optional Gecos *string `json:"gecos,omitempty"` - // Groups specifies the additional groups for the user + // groups specifies the additional groups for the user // +optional Groups *string `json:"groups,omitempty"` - // HomeDir specifies the home directory to use for the user + // homeDir specifies the home directory to use for the user // +optional HomeDir *string `json:"homeDir,omitempty"` - // Inactive specifies whether to mark the user as inactive + // inactive specifies whether to mark the user as inactive // +optional Inactive *bool `json:"inactive,omitempty"` - // Shell specifies the user's shell + // shell specifies the user's shell // +optional Shell *string `json:"shell,omitempty"` - // Passwd specifies a hashed password for the user + // passwd specifies a hashed password for the user // +optional Passwd *string `json:"passwd,omitempty"` - // PrimaryGroup specifies the primary group for the user + // primaryGroup specifies the primary group for the user // +optional PrimaryGroup *string `json:"primaryGroup,omitempty"` - // LockPassword specifies if password login should be disabled + // lockPassword specifies if password login should be disabled // +optional LockPassword *bool `json:"lockPassword,omitempty"` - // Sudo specifies a sudo role for the user + // sudo specifies a sudo role for the user // +optional Sudo *string `json:"sudo,omitempty"` - // SSHAuthorizedKeys specifies a list of ssh authorized keys for the user + // sshAuthorizedKeys specifies a list of ssh authorized keys for the user // +optional SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` } // NTP defines input for generated ntp in cloud-init. type NTP struct { - // Servers specifies which NTP servers to use + // servers specifies which NTP servers to use // +optional Servers []string `json:"servers,omitempty"` - // Enabled specifies whether NTP should be enabled + // enabled specifies whether NTP should be enabled // +optional Enabled *bool `json:"enabled,omitempty"` } // DiskSetup defines input for generated disk_setup and fs_setup in cloud-init. type DiskSetup struct { - // Partitions specifies the list of the partitions to setup. + // partitions specifies the list of the partitions to setup. Partitions []Partition `json:"partitions,omitempty"` - // Filesystems specifies the list of file systems to setup. + // filesystems specifies the list of file systems to setup. Filesystems []Filesystem `json:"filesystems,omitempty"` } // Partition defines how to create and layout a partition. type Partition struct { - // Device is the name of the device. + // device is the name of the device. Device string `json:"device"` - // Layout specifies the device layout. + // layout specifies the device layout. // If it is true, a single partition will be created for the entire device. // When layout is false, it means don't partition or ignore existing partitioning. Layout bool `json:"layout"` - // Overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. + // overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. // Use with caution. Default is 'false'. // +optional Overwrite *bool `json:"overwrite,omitempty"` - // TableType specifies the tupe of partition table. The following are supported: + // tableType specifies the tupe of partition table. The following are supported: // 'mbr': default and setups a MS-DOS partition table // 'gpt': setups a GPT partition table // +optional @@ -311,24 +311,24 @@ type Partition struct { // Filesystem defines the file systems to be created. type Filesystem struct { - // Device specifies the device name + // device specifies the device name Device string `json:"device"` - // Filesystem specifies the file system type. + // filesystem specifies the file system type. Filesystem string `json:"filesystem"` - // Label specifies the file system label to be used. If set to None, no label is used. + // label specifies the file system label to be used. If set to None, no label is used. Label string `json:"label"` - // Partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. + // partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. // +optional Partition *string `json:"partition,omitempty"` - // Overwrite defines whether or not to overwrite any existing filesystem. + // overwrite defines whether or not to overwrite any existing filesystem. // If true, any pre-existing file system will be destroyed. Use with Caution. // +optional Overwrite *bool `json:"overwrite,omitempty"` - // ReplaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . + // replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . // NOTE: unless you define a label, this requires the use of the 'any' partition directive. // +optional ReplaceFS *string `json:"replaceFS,omitempty"` - // ExtraOpts defined extra options to add to the command for creating the file system. + // extraOpts defined extra options to add to the command for creating the file system. // +optional ExtraOpts []string `json:"extraOpts,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 732f31f9e380..4e8e27d645d8 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/kubeadm_control_plane_types.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/kubeadm_control_plane_types.go @@ -65,24 +65,24 @@ type KubeadmControlPlaneSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // Version defines the desired Kubernetes version. + // version defines the desired Kubernetes version. Version string `json:"version"` - // InfrastructureTemplate is a required reference to a custom resource + // infrastructureTemplate is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureTemplate corev1.ObjectReference `json:"infrastructureTemplate"` - // KubeadmConfigSpec is a KubeadmConfigSpec + // kubeadmConfigSpec is a KubeadmConfigSpec // to use for initializing and joining machines to the control plane. KubeadmConfigSpec bootstrapv1alpha3.KubeadmConfigSpec `json:"kubeadmConfigSpec"` - // UpgradeAfter is a field to indicate an upgrade should be performed + // upgradeAfter is a field to indicate an upgrade should be performed // after the specified time even if no changes have been made to the // KubeadmControlPlane // +optional UpgradeAfter *metav1.Time `json:"upgradeAfter,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional @@ -97,7 +97,7 @@ type KubeadmControlPlaneSpec struct { // RolloutStrategy describes how to replace existing machines // with new ones. type RolloutStrategy struct { - // Type of rollout. Currently the only supported strategy is + // type of rollout. Currently the only supported strategy is // "RollingUpdate". // Default is RollingUpdate. // +optional @@ -123,7 +123,7 @@ type RollingUpdate struct { // KubeadmControlPlaneStatus defines the observed state of KubeadmControlPlane. type KubeadmControlPlaneStatus struct { - // Selector is the label selector in string format to avoid introspection + // selector is the label selector in string format to avoid introspection // by clients, and is used to provide the CRD-based integration for the // scale subresource and additional integrations for things like kubectl // describe.. The string will be in the same format as the query-param syntax. @@ -153,17 +153,17 @@ type KubeadmControlPlaneStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // Initialized denotes whether or not the control plane has the + // initialized denotes whether or not the control plane has the // uploaded kubeadm-config configmap. // +optional Initialized bool `json:"initialized"` - // Ready denotes that the KubeadmControlPlane API Server is ready to + // ready denotes that the KubeadmControlPlane API Server is ready to // receive requests. // +optional Ready bool `json:"ready"` - // FailureReason indicates that there is a terminal problem reconciling the + // failureReason indicates that there is a terminal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional @@ -174,11 +174,11 @@ type KubeadmControlPlaneStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the KubeadmControlPlane. + // conditions defines current service state of the KubeadmControlPlane. // +optional Conditions clusterv1alpha3.Conditions `json:"conditions,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 2ef88217634b..571043a96677 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/kubeadm_control_plane_types.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/kubeadm_control_plane_types.go @@ -59,18 +59,18 @@ type KubeadmControlPlaneSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // Version defines the desired Kubernetes version. + // version defines the desired Kubernetes version. Version string `json:"version"` - // MachineTemplate contains information about how machines + // machineTemplate contains information about how machines // should be shaped when creating or updating a control plane. MachineTemplate KubeadmControlPlaneMachineTemplate `json:"machineTemplate"` - // KubeadmConfigSpec is a KubeadmConfigSpec + // kubeadmConfigSpec is a KubeadmConfigSpec // to use for initializing and joining machines to the control plane. KubeadmConfigSpec bootstrapv1alpha4.KubeadmConfigSpec `json:"kubeadmConfigSpec"` - // RolloutAfter is a field to indicate a rollout should be performed + // rolloutAfter is a field to indicate a rollout should be performed // after the specified time even if no changes have been made to the // KubeadmControlPlane. // @@ -92,11 +92,11 @@ type KubeadmControlPlaneMachineTemplate struct { // +optional ObjectMeta clusterv1alpha4.ObjectMeta `json:"metadata,omitempty"` - // InfrastructureRef is a required reference to a custom resource + // infrastructureRef is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional @@ -106,7 +106,7 @@ type KubeadmControlPlaneMachineTemplate struct { // RolloutStrategy describes how to replace existing machines // with new ones. type RolloutStrategy struct { - // Type of rollout. Currently the only supported strategy is + // type of rollout. Currently the only supported strategy is // "RollingUpdate". // Default is RollingUpdate. // +optional @@ -132,7 +132,7 @@ type RollingUpdate struct { // KubeadmControlPlaneStatus defines the observed state of KubeadmControlPlane. type KubeadmControlPlaneStatus struct { - // Selector is the label selector in string format to avoid introspection + // selector is the label selector in string format to avoid introspection // by clients, and is used to provide the CRD-based integration for the // scale subresource and additional integrations for things like kubectl // describe.. The string will be in the same format as the query-param syntax. @@ -145,7 +145,7 @@ type KubeadmControlPlaneStatus struct { // +optional Replicas int32 `json:"replicas,omitempty"` - // Version represents the minimum Kubernetes version for the control plane machines + // version represents the minimum Kubernetes version for the control plane machines // in the cluster. // +optional Version *string `json:"version,omitempty"` @@ -167,17 +167,17 @@ type KubeadmControlPlaneStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // Initialized denotes whether or not the control plane has the + // initialized denotes whether or not the control plane has the // uploaded kubeadm-config configmap. // +optional Initialized bool `json:"initialized"` - // Ready denotes that the KubeadmControlPlane API Server is ready to + // ready denotes that the KubeadmControlPlane API Server is ready to // receive requests. // +optional Ready bool `json:"ready"` - // FailureReason indicates that there is a terminal problem reconciling the + // failureReason indicates that there is a terminal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional @@ -188,11 +188,11 @@ type KubeadmControlPlaneStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the KubeadmControlPlane. + // conditions defines current service state of the KubeadmControlPlane. // +optional Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go b/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go index 81d270eeb204..d28a33c2beae 100644 --- a/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go +++ b/internal/apis/core/exp/addons/v1alpha3/clusterresourceset_types.go @@ -40,10 +40,10 @@ type ClusterResourceSetSpec struct { // It must match the Cluster labels. This field is immutable. ClusterSelector metav1.LabelSelector `json:"clusterSelector"` - // Resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. + // resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. Resources []ResourceRef `json:"resources,omitempty"` - // Strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. + // strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. // +kubebuilder:validation:Enum=ApplyOnce // +optional Strategy string `json:"strategy,omitempty"` @@ -62,11 +62,11 @@ const ( // ResourceRef specifies a resource. type ResourceRef struct { - // Name of the resource that is in the same namespace with ClusterResourceSet object. + // name of the resource that is in the same namespace with ClusterResourceSet object. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` - // Kind of the resource. Supported kinds are: Secrets and ConfigMaps. + // kind of the resource. Supported kinds are: Secrets and ConfigMaps. // +kubebuilder:validation:Enum=Secret;ConfigMap Kind string `json:"kind"` } @@ -89,11 +89,11 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy) // ClusterResourceSetStatus defines the observed state of ClusterResourceSet. type ClusterResourceSetStatus struct { - // ObservedGeneration reflects the generation of the most recently observed ClusterResourceSet. + // observedGeneration reflects the generation of the most recently observed ClusterResourceSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current state of the ClusterResourceSet. + // conditions defines current state of the ClusterResourceSet. // +optional Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/exp/addons/v1alpha3/clusterresourcesetbinding_types.go b/internal/apis/core/exp/addons/v1alpha3/clusterresourcesetbinding_types.go index 101c2cf11893..78c50be68e11 100644 --- a/internal/apis/core/exp/addons/v1alpha3/clusterresourcesetbinding_types.go +++ b/internal/apis/core/exp/addons/v1alpha3/clusterresourcesetbinding_types.go @@ -29,15 +29,15 @@ type ResourceBinding struct { // ResourceRef specifies a resource. ResourceRef `json:",inline"` - // Hash is the hash of a resource's data. This can be used to decide if a resource is changed. + // hash is the hash of a resource's data. This can be used to decide if a resource is changed. // For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. Hash string `json:"hash,omitempty"` - // LastAppliedTime identifies when this resource was last applied to the cluster. + // lastAppliedTime identifies when this resource was last applied to the cluster. // +optional LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"` - // Applied is to track if a resource is applied to the cluster or not. + // applied is to track if a resource is applied to the cluster or not. Applied bool `json:"applied"` } @@ -45,10 +45,10 @@ type ResourceBinding struct { // ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet. type ResourceSetBinding struct { - // ClusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. + // clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. ClusterResourceSetName string `json:"clusterResourceSetName"` - // Resources is a list of resources that the ClusterResourceSet has. + // resources is a list of resources that the ClusterResourceSet has. Resources []ResourceBinding `json:"resources,omitempty"` } @@ -119,7 +119,7 @@ type ClusterResourceSetBinding struct { // ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding. type ClusterResourceSetBindingSpec struct { - // Bindings is a list of ClusterResourceSets and their resources. + // bindings is a list of ClusterResourceSets and their resources. Bindings []*ResourceSetBinding `json:"bindings,omitempty"` } diff --git a/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go b/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go index 4b226ab76789..399360fe4387 100644 --- a/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go +++ b/internal/apis/core/exp/addons/v1alpha4/clusterresourceset_types.go @@ -41,10 +41,10 @@ type ClusterResourceSetSpec struct { // Label selector cannot be empty. ClusterSelector metav1.LabelSelector `json:"clusterSelector"` - // Resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. + // resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. Resources []ResourceRef `json:"resources,omitempty"` - // Strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. + // strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. // +kubebuilder:validation:Enum=ApplyOnce // +optional Strategy string `json:"strategy,omitempty"` @@ -63,11 +63,11 @@ const ( // ResourceRef specifies a resource. type ResourceRef struct { - // Name of the resource that is in the same namespace with ClusterResourceSet object. + // name of the resource that is in the same namespace with ClusterResourceSet object. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` - // Kind of the resource. Supported kinds are: Secrets and ConfigMaps. + // kind of the resource. Supported kinds are: Secrets and ConfigMaps. // +kubebuilder:validation:Enum=Secret;ConfigMap Kind string `json:"kind"` } @@ -90,11 +90,11 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy) // ClusterResourceSetStatus defines the observed state of ClusterResourceSet. type ClusterResourceSetStatus struct { - // ObservedGeneration reflects the generation of the most recently observed ClusterResourceSet. + // observedGeneration reflects the generation of the most recently observed ClusterResourceSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current state of the ClusterResourceSet. + // conditions defines current state of the ClusterResourceSet. // +optional Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/exp/addons/v1alpha4/clusterresourcesetbinding_types.go b/internal/apis/core/exp/addons/v1alpha4/clusterresourcesetbinding_types.go index 5cd2e123d0ea..3b48a98a7c80 100644 --- a/internal/apis/core/exp/addons/v1alpha4/clusterresourcesetbinding_types.go +++ b/internal/apis/core/exp/addons/v1alpha4/clusterresourcesetbinding_types.go @@ -29,15 +29,15 @@ type ResourceBinding struct { // ResourceRef specifies a resource. ResourceRef `json:",inline"` - // Hash is the hash of a resource's data. This can be used to decide if a resource is changed. + // hash is the hash of a resource's data. This can be used to decide if a resource is changed. // For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. Hash string `json:"hash,omitempty"` - // LastAppliedTime identifies when this resource was last applied to the cluster. + // lastAppliedTime identifies when this resource was last applied to the cluster. // +optional LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"` - // Applied is to track if a resource is applied to the cluster or not. + // applied is to track if a resource is applied to the cluster or not. Applied bool `json:"applied"` } @@ -45,10 +45,10 @@ type ResourceBinding struct { // ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet. type ResourceSetBinding struct { - // ClusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. + // clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. ClusterResourceSetName string `json:"clusterResourceSetName"` - // Resources is a list of resources that the ClusterResourceSet has. + // resources is a list of resources that the ClusterResourceSet has. Resources []ResourceBinding `json:"resources,omitempty"` } @@ -120,7 +120,7 @@ type ClusterResourceSetBinding struct { // ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding. type ClusterResourceSetBindingSpec struct { - // Bindings is a list of ClusterResourceSets and their resources. + // bindings is a list of ClusterResourceSets and their resources. Bindings []*ResourceSetBinding `json:"bindings,omitempty"` } diff --git a/internal/apis/core/exp/v1alpha3/machinepool_types.go b/internal/apis/core/exp/v1alpha3/machinepool_types.go index 42ad1ac8952d..c68511e539c4 100644 --- a/internal/apis/core/exp/v1alpha3/machinepool_types.go +++ b/internal/apis/core/exp/v1alpha3/machinepool_types.go @@ -33,7 +33,7 @@ const ( // MachinePoolSpec defines the desired state of MachinePool. type MachinePoolSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` @@ -41,7 +41,7 @@ type MachinePoolSpec struct { // 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 describes the machines that will be created. Template clusterv1alpha3.MachineTemplateSpec `json:"template"` // The deployment strategy to use to replace existing machine instances with @@ -56,12 +56,12 @@ type MachinePoolSpec struct { // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // ProviderIDList are the identification IDs of machine instances provided by the provider. + // providerIDList are the identification IDs of machine instances provided by the provider. // This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. // +optional ProviderIDList []string `json:"providerIDList,omitempty"` - // FailureDomains is the list of failure domains this MachinePool should be attached to. + // failureDomains is the list of failure domains this MachinePool should be attached to. FailureDomains []string `json:"failureDomains,omitempty"` } @@ -71,11 +71,11 @@ type MachinePoolSpec struct { // MachinePoolStatus defines the observed state of MachinePool. type MachinePoolStatus struct { - // NodeRefs will point to the corresponding Nodes if it they exist. + // nodeRefs will point to the corresponding Nodes if it they exist. // +optional NodeRefs []corev1.ObjectReference `json:"nodeRefs,omitempty"` - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. // +optional Replicas int32 `json:"replicas"` @@ -95,34 +95,34 @@ type MachinePoolStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // FailureReason indicates that there is a problem reconciling the state, and + // failureReason indicates that there is a problem reconciling the state, and // will be set to a token value suitable for programmatic interpretation. // +optional FailureReason *capierrors.MachinePoolStatusFailure `json:"failureReason,omitempty"` - // FailureMessage indicates that there is a problem reconciling the state, + // failureMessage indicates that there is a problem reconciling the state, // and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Phase represents the current phase of cluster actuation. + // phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // BootstrapReady is the state of the bootstrap provider. + // bootstrapReady is the state of the bootstrap provider. // +optional BootstrapReady bool `json:"bootstrapReady"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions define the current service state of the MachinePool. + // conditions define the current service state of the MachinePool. // +optional Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/exp/v1alpha4/machinepool_types.go b/internal/apis/core/exp/v1alpha4/machinepool_types.go index 06f6d5876fc2..a9fe8cbbb124 100644 --- a/internal/apis/core/exp/v1alpha4/machinepool_types.go +++ b/internal/apis/core/exp/v1alpha4/machinepool_types.go @@ -33,7 +33,7 @@ const ( // MachinePoolSpec defines the desired state of MachinePool. type MachinePoolSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` @@ -41,7 +41,7 @@ type MachinePoolSpec struct { // 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 describes the machines that will be created. Template clusterv1alpha4.MachineTemplateSpec `json:"template"` // Minimum number of seconds for which a newly created machine instances should @@ -51,12 +51,12 @@ type MachinePoolSpec struct { // +optional MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` - // ProviderIDList are the identification IDs of machine instances provided by the provider. + // providerIDList are the identification IDs of machine instances provided by the provider. // This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. // +optional ProviderIDList []string `json:"providerIDList,omitempty"` - // FailureDomains is the list of failure domains this MachinePool should be attached to. + // failureDomains is the list of failure domains this MachinePool should be attached to. FailureDomains []string `json:"failureDomains,omitempty"` } @@ -66,11 +66,11 @@ type MachinePoolSpec struct { // MachinePoolStatus defines the observed state of MachinePool. type MachinePoolStatus struct { - // NodeRefs will point to the corresponding Nodes if it they exist. + // nodeRefs will point to the corresponding Nodes if it they exist. // +optional NodeRefs []corev1.ObjectReference `json:"nodeRefs,omitempty"` - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. // +optional Replicas int32 `json:"replicas"` @@ -90,34 +90,34 @@ type MachinePoolStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // FailureReason indicates that there is a problem reconciling the state, and + // failureReason indicates that there is a problem reconciling the state, and // will be set to a token value suitable for programmatic interpretation. // +optional FailureReason *capierrors.MachinePoolStatusFailure `json:"failureReason,omitempty"` - // FailureMessage indicates that there is a problem reconciling the state, + // failureMessage indicates that there is a problem reconciling the state, // and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Phase represents the current phase of cluster actuation. + // phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // BootstrapReady is the state of the bootstrap provider. + // bootstrapReady is the state of the bootstrap provider. // +optional BootstrapReady bool `json:"bootstrapReady"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions define the current service state of the MachinePool. + // conditions define the current service state of the MachinePool. // +optional Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/v1alpha3/cluster_types.go b/internal/apis/core/v1alpha3/cluster_types.go index 9e106ce3492e..8fd90e134c9f 100644 --- a/internal/apis/core/v1alpha3/cluster_types.go +++ b/internal/apis/core/v1alpha3/cluster_types.go @@ -38,7 +38,7 @@ const ( // ClusterSpec defines the desired state of Cluster. type ClusterSpec struct { - // Paused can be used to prevent controllers from processing the Cluster and all its associated objects. + // paused can be used to prevent controllers from processing the Cluster and all its associated objects. // +optional Paused bool `json:"paused,omitempty"` @@ -46,16 +46,16 @@ type ClusterSpec struct { // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // controlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` - // ControlPlaneRef is an optional reference to a provider-specific resource that holds + // controlPlaneRef is an optional reference to a provider-specific resource that holds // the details for provisioning the Control Plane for a Cluster. // +optional ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` - // InfrastructureRef is a reference to a provider-specific resource that holds the details + // infrastructureRef is a reference to a provider-specific resource that holds the details // for provisioning infrastructure for a cluster in said provider. // +optional InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` @@ -68,7 +68,7 @@ type ClusterSpec struct { // ClusterNetwork specifies the different networking // parameters for a cluster. type ClusterNetwork struct { - // APIServerPort specifies the port the API Server should bind to. + // apiServerPort specifies the port the API Server should bind to. // Defaults to 6443. // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` @@ -108,42 +108,42 @@ func (n *NetworkRanges) String() string { // ClusterStatus defines the observed state of Cluster. type ClusterStatus struct { - // FailureDomains is a slice of failure domain objects synced from the infrastructure provider. + // failureDomains is a slice of failure domain objects synced from the infrastructure provider. FailureDomains FailureDomains `json:"failureDomains,omitempty"` - // FailureReason indicates that there is a fatal problem reconciling the + // failureReason indicates that there is a fatal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional FailureReason *capierrors.ClusterStatusError `json:"failureReason,omitempty"` - // FailureMessage indicates that there is a fatal problem reconciling the + // failureMessage indicates that there is a fatal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Phase represents the current phase of cluster actuation. + // phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ControlPlaneInitialized defines if the control plane has been initialized. + // controlPlaneInitialized defines if the control plane has been initialized. // +optional ControlPlaneInitialized bool `json:"controlPlaneInitialized"` - // ControlPlaneReady defines if the control plane is ready. + // controlPlaneReady defines if the control plane is ready. // +optional ControlPlaneReady bool `json:"controlPlaneReady,omitempty"` - // Conditions defines current service state of the cluster. + // conditions defines current service state of the cluster. // +optional Conditions Conditions `json:"conditions,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } @@ -265,11 +265,11 @@ func (in FailureDomains) GetIDs() []*string { // FailureDomainSpec is the Schema for Cluster API failure domains. // It allows controllers to understand how many failure domains a cluster can optionally span across. type FailureDomainSpec struct { - // ControlPlane determines if this failure domain is suitable for use by control plane machines. + // controlPlane determines if this failure domain is suitable for use by control plane machines. // +optional ControlPlane bool `json:"controlPlane"` - // Attributes is a free form map of attributes an infrastructure provider might use or require. + // attributes is a free form map of attributes an infrastructure provider might use or require. // +optional Attributes map[string]string `json:"attributes,omitempty"` } diff --git a/internal/apis/core/v1alpha3/common_types.go b/internal/apis/core/v1alpha3/common_types.go index 58ef4a74e2cf..3ee944bb52e7 100644 --- a/internal/apis/core/v1alpha3/common_types.go +++ b/internal/apis/core/v1alpha3/common_types.go @@ -123,7 +123,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 { - // Name must be unique within a namespace. Is required when creating resources, although + // name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. @@ -134,7 +134,7 @@ type ObjectMeta struct { // Deprecated: This field has no function and is going to be removed in a next release. Name string `json:"name,omitempty"` - // GenerateName is an optional prefix, used by the server, to generate a unique + // generateName is an optional prefix, used by the server, to generate a unique // name ONLY IF the Name field has not been provided. // If this field is used, the name returned to the client will be different // than the name passed. This value will also be combined with a unique suffix. @@ -154,7 +154,7 @@ type ObjectMeta struct { // Deprecated: This field has no function and is going to be removed in a next release. GenerateName string `json:"generateName,omitempty"` - // Namespace defines the space within each name must be unique. An empty namespace is + // namespace defines the space within each name must be unique. An empty namespace is // equivalent to the "default" namespace, but "default" is the canonical representation. // Not all objects are required to be scoped to a namespace - the value of this field for // those objects will be empty. @@ -174,7 +174,7 @@ type ObjectMeta struct { // +optional Labels map[string]string `json:"labels,omitempty"` - // Annotations is an unstructured key value map stored with a resource that may be + // annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations diff --git a/internal/apis/core/v1alpha3/condition_types.go b/internal/apis/core/v1alpha3/condition_types.go index 3a950da84766..b993200f1e47 100644 --- a/internal/apis/core/v1alpha3/condition_types.go +++ b/internal/apis/core/v1alpha3/condition_types.go @@ -53,17 +53,17 @@ type ConditionType string // Condition defines an observation of a Cluster API resource operational state. type Condition struct { - // Type of condition in CamelCase or in foo.example.com/CamelCase. + // type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions // can be useful (see .node.status.conditions), the ability to deconflict is important. // +required Type ConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. // +required Status corev1.ConditionStatus `json:"status"` - // Severity provides an explicit classification of Reason code, so the users or machines can immediately + // severity provides an explicit classification of Reason code, so the users or machines can immediately // understand the current situation and act accordingly. // The Severity field MUST be set only when Status=False. // +optional diff --git a/internal/apis/core/v1alpha3/machine_types.go b/internal/apis/core/v1alpha3/machine_types.go index 69b0e1b3053a..7d0a2324d064 100644 --- a/internal/apis/core/v1alpha3/machine_types.go +++ b/internal/apis/core/v1alpha3/machine_types.go @@ -56,24 +56,24 @@ const ( // MachineSpec defines the desired state of Machine. type MachineSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Bootstrap is a reference to a local struct which encapsulates + // bootstrap is a reference to a local struct which encapsulates // fields to configure the Machine’s bootstrapping mechanism. Bootstrap Bootstrap `json:"bootstrap"` - // InfrastructureRef is a required reference to a custom resource + // infrastructureRef is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` - // Version defines the desired Kubernetes version. + // version defines the desired Kubernetes version. // This field is meant to be optionally used by bootstrap providers. // +optional Version *string `json:"version,omitempty"` - // ProviderID is the identification ID of the machine provided by the provider. + // providerID is the identification ID of the machine provided by the provider. // This field must match the provider ID as seen on the node object corresponding to this machine. // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler // with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out @@ -86,12 +86,12 @@ type MachineSpec struct { // +optional ProviderID *string `json:"providerID,omitempty"` - // FailureDomain is the failure domain the machine will be created in. + // failureDomain is the failure domain the machine will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // +optional FailureDomain *string `json:"failureDomain,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional @@ -104,22 +104,22 @@ type MachineSpec struct { // MachineStatus defines the observed state of Machine. type MachineStatus struct { - // NodeRef will point to the corresponding Node if it exists. + // nodeRef will point to the corresponding Node if it exists. // +optional NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - // LastUpdated identifies when the phase of the Machine last transitioned. + // lastUpdated identifies when the phase of the Machine last transitioned. // +optional LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - // Version specifies the current version of Kubernetes running + // version specifies the current version of Kubernetes running // on the corresponding Node. This is meant to be a means of bubbling // up status from the Node to the Machine. // It is entirely optional, but useful for end-user UX if it’s present. // +optional Version *string `json:"version,omitempty"` - // FailureReason will be set in the event that there is a terminal problem + // failureReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // @@ -138,7 +138,7 @@ type MachineStatus struct { // +optional FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"` - // FailureMessage will be set in the event that there is a terminal problem + // failureMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // @@ -157,29 +157,29 @@ type MachineStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Addresses is a list of addresses assigned to the machine. + // addresses is a list of addresses assigned to the machine. // This field is copied from the infrastructure provider reference. // +optional Addresses MachineAddresses `json:"addresses,omitempty"` - // Phase represents the current phase of machine actuation. + // phase represents the current phase of machine actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // BootstrapReady is the state of the bootstrap provider. + // bootstrapReady is the state of the bootstrap provider. // +optional BootstrapReady bool `json:"bootstrapReady"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the Machine. + // conditions defines current service state of the Machine. // +optional Conditions Conditions `json:"conditions,omitempty"` } @@ -213,14 +213,14 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase { // Bootstrap capsulates fields to configure the Machine’s bootstrapping mechanism. type Bootstrap struct { - // ConfigRef is a reference to a bootstrap provider-specific resource + // configRef is a reference to a bootstrap provider-specific resource // that holds configuration details. The reference is optional to // allow users/operators to specify Bootstrap.Data without // the need of a controller. // +optional ConfigRef *corev1.ObjectReference `json:"configRef,omitempty"` - // Data contains the bootstrap data, such as cloud-init details scripts. + // data contains the bootstrap data, such as cloud-init details scripts. // If nil, the Machine should remain in the Pending state. // // Deprecated: Switch to DataSecretName. @@ -228,7 +228,7 @@ type Bootstrap struct { // +optional Data *string `json:"data,omitempty"` - // DataSecretName is the name of the secret that stores the bootstrap data script. + // dataSecretName is the name of the secret that stores the bootstrap data script. // If nil, the Machine should remain in the Pending state. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` diff --git a/internal/apis/core/v1alpha3/machinedeployment_types.go b/internal/apis/core/v1alpha3/machinedeployment_types.go index 4aa959c8d6b0..7efaf05baa1e 100644 --- a/internal/apis/core/v1alpha3/machinedeployment_types.go +++ b/internal/apis/core/v1alpha3/machinedeployment_types.go @@ -47,7 +47,7 @@ const ( // MachineDeploymentSpec defines the desired state of MachineDeployment. type MachineDeploymentSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` @@ -60,7 +60,7 @@ type MachineDeploymentSpec struct { // It must match the machine template's labels. Selector metav1.LabelSelector `json:"selector"` - // Template describes the machines that will be created. + // template describes the machines that will be created. Template MachineTemplateSpec `json:"template"` // The deployment strategy to use to replace existing machines with @@ -100,7 +100,7 @@ type MachineDeploymentSpec struct { // MachineDeploymentStrategy describes how to replace existing machines // with new ones. type MachineDeploymentStrategy struct { - // Type of deployment. Currently the only supported strategy is + // type of deployment. Currently the only supported strategy is // "RollingUpdate". // Default is RollingUpdate. // +optional @@ -160,7 +160,7 @@ type MachineDeploymentStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Selector is the same as the label selector but in the string format to avoid introspection + // selector is the same as the label selector but in the string format to avoid introspection // by clients. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional @@ -193,7 +193,7 @@ type MachineDeploymentStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // Phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). + // phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). // +optional Phase string `json:"phase,omitempty"` } diff --git a/internal/apis/core/v1alpha3/machinehealthcheck_types.go b/internal/apis/core/v1alpha3/machinehealthcheck_types.go index 00aba45ab68e..fb94304e8319 100644 --- a/internal/apis/core/v1alpha3/machinehealthcheck_types.go +++ b/internal/apis/core/v1alpha3/machinehealthcheck_types.go @@ -26,14 +26,14 @@ import ( // MachineHealthCheckSpec defines the desired state of MachineHealthCheck. type MachineHealthCheckSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` // Label selector to match machines whose health will be exercised Selector metav1.LabelSelector `json:"selector"` - // UnhealthyConditions contains a list of the conditions that determine + // unhealthyConditions contains a list of the conditions that determine // whether a node is considered unhealthy. The conditions are combined in a // logical OR, i.e. if any of the conditions is met, the node is unhealthy. // @@ -50,7 +50,7 @@ type MachineHealthCheckSpec struct { // +optional NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - // RemediationTemplate is a reference to a remediation template + // remediationTemplate is a reference to a remediation template // provided by an infrastructure provider. // // This field is completely optional, when filled, the MachineHealthCheck controller @@ -93,20 +93,20 @@ type MachineHealthCheckStatus struct { // +kubebuilder:validation:Minimum=0 CurrentHealthy int32 `json:"currentHealthy,omitempty"` - // RemediationsAllowed is the number of further remediations allowed by this machine health check before + // remediationsAllowed is the number of further remediations allowed by this machine health check before // maxUnhealthy short circuiting will be applied // +kubebuilder:validation:Minimum=0 RemediationsAllowed int32 `json:"remediationsAllowed,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Targets shows the current list of machines the machine health check is watching + // targets shows the current list of machines the machine health check is watching // +optional Targets []string `json:"targets,omitempty"` - // Conditions defines current service state of the MachineHealthCheck. + // conditions defines current service state of the MachineHealthCheck. // +optional Conditions Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/v1alpha3/machineset_types.go b/internal/apis/core/v1alpha3/machineset_types.go index 6ce31ca0ec95..431f400969bc 100644 --- a/internal/apis/core/v1alpha3/machineset_types.go +++ b/internal/apis/core/v1alpha3/machineset_types.go @@ -29,33 +29,33 @@ import ( // MachineSetSpec defines the desired state of MachineSet. type MachineSetSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Replicas is the number of desired replicas. + // replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. // +optional Replicas *int32 `json:"replicas,omitempty"` - // MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready. + // 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"` - // DeletePolicy defines the policy used to identify nodes to delete when downscaling. + // deletePolicy defines the policy used to identify nodes to delete when downscaling. // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" // +kubebuilder:validation:Enum=Random;Newest;Oldest DeletePolicy string `json:"deletePolicy,omitempty"` - // Selector is a label query over machines that should match the replica count. + // selector is a label query over machines that should match the replica count. // Label keys and values that must match in order to be controlled by this MachineSet. // It must match the machine template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector metav1.LabelSelector `json:"selector"` - // Template is the object that describes the machine that will be created if + // template is the object that describes the machine that will be created if // insufficient replicas are detected. // Object references to custom resources are treated as templates. // +optional @@ -109,13 +109,13 @@ const ( // MachineSetStatus defines the observed state of MachineSet. type MachineSetStatus struct { - // Selector is the same as the label selector but in the string format to avoid introspection + // selector is the same as the label selector but in the string format to avoid introspection // by clients. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional Selector string `json:"selector,omitempty"` - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. // +optional Replicas int32 `json:"replicas,omitempty"` @@ -131,7 +131,7 @@ type MachineSetStatus struct { // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // ObservedGeneration reflects the generation of the most recently observed MachineSet. + // observedGeneration reflects the generation of the most recently observed MachineSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` diff --git a/internal/apis/core/v1alpha4/cluster_types.go b/internal/apis/core/v1alpha4/cluster_types.go index 019329d7c62e..65fdc019afb7 100644 --- a/internal/apis/core/v1alpha4/cluster_types.go +++ b/internal/apis/core/v1alpha4/cluster_types.go @@ -39,7 +39,7 @@ const ( // ClusterSpec defines the desired state of Cluster. type ClusterSpec struct { - // Paused can be used to prevent controllers from processing the Cluster and all its associated objects. + // paused can be used to prevent controllers from processing the Cluster and all its associated objects. // +optional Paused bool `json:"paused,omitempty"` @@ -47,16 +47,16 @@ type ClusterSpec struct { // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // controlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` - // ControlPlaneRef is an optional reference to a provider-specific resource that holds + // controlPlaneRef is an optional reference to a provider-specific resource that holds // the details for provisioning the Control Plane for a Cluster. // +optional ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` - // InfrastructureRef is a reference to a provider-specific resource that holds the details + // infrastructureRef is a reference to a provider-specific resource that holds the details // for provisioning infrastructure for a cluster in said provider. // +optional InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` @@ -77,16 +77,16 @@ type Topology struct { // The Kubernetes version of the cluster. Version string `json:"version"` - // RolloutAfter performs a rollout of the entire cluster one component at a time, + // rolloutAfter performs a rollout of the entire cluster one component at a time, // control plane first and then machine deployments. // +optional RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` - // ControlPlane describes the cluster control plane. + // controlPlane describes the cluster control plane. // +optional ControlPlane ControlPlaneTopology `json:"controlPlane"` - // Workers encapsulates the different constructs that form the worker nodes + // workers encapsulates the different constructs that form the worker nodes // for the cluster. // +optional Workers *WorkersTopology `json:"workers,omitempty"` @@ -94,14 +94,14 @@ type Topology struct { // ControlPlaneTopology specifies the parameters for the control plane nodes in the cluster. type ControlPlaneTopology struct { - // Metadata is the metadata applied to the machines of the ControlPlane. + // metadata is the metadata applied to the machines of the ControlPlane. // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. // // This field is supported if and only if the control plane provider template // referenced in the ClusterClass is Machine based. Metadata ObjectMeta `json:"metadata,omitempty"` - // Replicas is the number of control plane nodes. + // replicas is the number of control plane nodes. // If the value is nil, the ControlPlane object is created without the number of Replicas // and it's assumed that the control plane controller does not implement support for this field. // When specified against a control plane provider that lacks support for this field, this value will be ignored. @@ -111,29 +111,29 @@ type ControlPlaneTopology struct { // WorkersTopology represents the different sets of worker nodes in the cluster. type WorkersTopology struct { - // MachineDeployments is a list of machine deployments in the cluster. + // machineDeployments is a list of machine deployments in the cluster. MachineDeployments []MachineDeploymentTopology `json:"machineDeployments,omitempty"` } // MachineDeploymentTopology specifies the different parameters for a set of worker nodes in the topology. // This set of nodes is managed by a MachineDeployment object whose lifecycle is managed by the Cluster controller. type MachineDeploymentTopology struct { - // Metadata is the metadata applied to the machines of the MachineDeployment. + // metadata is the metadata applied to the machines of the MachineDeployment. // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. Metadata ObjectMeta `json:"metadata,omitempty"` - // Class is the name of the MachineDeploymentClass used to create the set of worker nodes. + // class is the name of the MachineDeploymentClass used to create the set of worker nodes. // This should match one of the deployment classes defined in the ClusterClass object // mentioned in the `Cluster.Spec.Class` field. Class string `json:"class"` - // Name is the unique identifier for this MachineDeploymentTopology. + // name is the unique identifier for this MachineDeploymentTopology. // The value is used with other unique identifiers to create a MachineDeployment's Name // (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, // the values are hashed together. Name string `json:"name"` - // Replicas is the number of worker nodes belonging to this set. + // replicas is the number of worker nodes belonging to this set. // If the value is nil, the MachineDeployment is created without the number of Replicas (defaulting to zero) // and it's assumed that an external entity (like cluster autoscaler) is responsible for the management // of this value. @@ -148,7 +148,7 @@ type MachineDeploymentTopology struct { // ClusterNetwork specifies the different networking // parameters for a cluster. type ClusterNetwork struct { - // APIServerPort specifies the port the API Server should bind to. + // apiServerPort specifies the port the API Server should bind to. // Defaults to 6443. // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` @@ -188,38 +188,38 @@ func (n *NetworkRanges) String() string { // ClusterStatus defines the observed state of Cluster. type ClusterStatus struct { - // FailureDomains is a slice of failure domain objects synced from the infrastructure provider. + // failureDomains is a slice of failure domain objects synced from the infrastructure provider. FailureDomains FailureDomains `json:"failureDomains,omitempty"` - // FailureReason indicates that there is a fatal problem reconciling the + // failureReason indicates that there is a fatal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional FailureReason *capierrors.ClusterStatusError `json:"failureReason,omitempty"` - // FailureMessage indicates that there is a fatal problem reconciling the + // failureMessage indicates that there is a fatal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Phase represents the current phase of cluster actuation. + // phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ControlPlaneReady defines if the control plane is ready. + // controlPlaneReady defines if the control plane is ready. // +optional ControlPlaneReady bool `json:"controlPlaneReady,omitempty"` - // Conditions defines current service state of the cluster. + // conditions defines current service state of the cluster. // +optional Conditions Conditions `json:"conditions,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } @@ -430,11 +430,11 @@ func (in FailureDomains) GetIDs() []*string { // FailureDomainSpec is the Schema for Cluster API failure domains. // It allows controllers to understand how many failure domains a cluster can optionally span across. type FailureDomainSpec struct { - // ControlPlane determines if this failure domain is suitable for use by control plane machines. + // controlPlane determines if this failure domain is suitable for use by control plane machines. // +optional ControlPlane bool `json:"controlPlane"` - // Attributes is a free form map of attributes an infrastructure provider might use or require. + // attributes is a free form map of attributes an infrastructure provider might use or require. // +optional Attributes map[string]string `json:"attributes,omitempty"` } diff --git a/internal/apis/core/v1alpha4/clusterclass_types.go b/internal/apis/core/v1alpha4/clusterclass_types.go index 62a6413b70a5..ad70f9d33455 100644 --- a/internal/apis/core/v1alpha4/clusterclass_types.go +++ b/internal/apis/core/v1alpha4/clusterclass_types.go @@ -39,18 +39,18 @@ type ClusterClass struct { // ClusterClassSpec describes the desired state of the ClusterClass. type ClusterClassSpec struct { - // Infrastructure is a reference to a provider-specific template that holds + // infrastructure is a reference to a provider-specific template that holds // the details for provisioning infrastructure specific cluster // for the underlying provider. // The underlying provider is responsible for the implementation // of the template to an infrastructure cluster. Infrastructure LocalObjectTemplate `json:"infrastructure,omitempty"` - // ControlPlane is a reference to a local struct that holds the details + // controlPlane is a reference to a local struct that holds the details // for provisioning the Control Plane for the Cluster. ControlPlane ControlPlaneClass `json:"controlPlane,omitempty"` - // Workers describes the worker nodes for the cluster. + // workers describes the worker nodes for the cluster. // It is a collection of node types which can be used to create // the worker nodes of the cluster. // +optional @@ -59,7 +59,7 @@ type ClusterClassSpec struct { // ControlPlaneClass defines the class for the control plane. type ControlPlaneClass struct { - // Metadata is the metadata applied to the machines of the ControlPlane. + // metadata is the metadata applied to the machines of the ControlPlane. // At runtime this metadata is merged with the corresponding metadata from the topology. // // This field is supported if and only if the control plane provider template @@ -81,7 +81,7 @@ type ControlPlaneClass struct { // WorkersClass is a collection of deployment classes. type WorkersClass struct { - // MachineDeployments is a list of machine deployment classes that can be used to create + // machineDeployments is a list of machine deployment classes that can be used to create // a set of worker nodes. MachineDeployments []MachineDeploymentClass `json:"machineDeployments,omitempty"` } @@ -89,12 +89,12 @@ type WorkersClass struct { // MachineDeploymentClass serves as a template to define a set of worker nodes of the cluster // provisioned using the `ClusterClass`. type MachineDeploymentClass struct { - // Class denotes a type of worker node present in the cluster, + // class denotes a type of worker node present in the cluster, // this name MUST be unique within a ClusterClass and can be referenced // in the Cluster to create a managed MachineDeployment. Class string `json:"class"` - // Template is a local struct containing a collection of templates for creation of + // template is a local struct containing a collection of templates for creation of // MachineDeployment objects representing a set of worker nodes. Template MachineDeploymentClassTemplate `json:"template"` } @@ -102,22 +102,22 @@ type MachineDeploymentClass struct { // MachineDeploymentClassTemplate defines how a MachineDeployment generated from a MachineDeploymentClass // should look like. type MachineDeploymentClassTemplate struct { - // Metadata is the metadata applied to the machines of the MachineDeployment. + // metadata is the metadata applied to the machines of the MachineDeployment. // At runtime this metadata is merged with the corresponding metadata from the topology. Metadata ObjectMeta `json:"metadata,omitempty"` - // Bootstrap contains the bootstrap template reference to be used + // bootstrap contains the bootstrap template reference to be used // for the creation of worker Machines. Bootstrap LocalObjectTemplate `json:"bootstrap"` - // Infrastructure contains the infrastructure template reference to be used + // infrastructure contains the infrastructure template reference to be used // for the creation of worker Machines. Infrastructure LocalObjectTemplate `json:"infrastructure"` } // LocalObjectTemplate defines a template for a topology Class. type LocalObjectTemplate struct { - // Ref is a required reference to a custom resource + // ref is a required reference to a custom resource // offered by a provider. Ref *corev1.ObjectReference `json:"ref"` } diff --git a/internal/apis/core/v1alpha4/common_types.go b/internal/apis/core/v1alpha4/common_types.go index 6893544c3eb9..bc17ac1ecfe6 100644 --- a/internal/apis/core/v1alpha4/common_types.go +++ b/internal/apis/core/v1alpha4/common_types.go @@ -182,7 +182,7 @@ type ObjectMeta struct { // +optional Labels map[string]string `json:"labels,omitempty"` - // Annotations is an unstructured key value map stored with a resource that may be + // annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations diff --git a/internal/apis/core/v1alpha4/condition_types.go b/internal/apis/core/v1alpha4/condition_types.go index 5ff2ffcc0a2a..910bb42ba859 100644 --- a/internal/apis/core/v1alpha4/condition_types.go +++ b/internal/apis/core/v1alpha4/condition_types.go @@ -53,17 +53,17 @@ type ConditionType string // Condition defines an observation of a Cluster API resource operational state. type Condition struct { - // Type of condition in CamelCase or in foo.example.com/CamelCase. + // type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions // can be useful (see .node.status.conditions), the ability to deconflict is important. // +required Type ConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. // +required Status corev1.ConditionStatus `json:"status"` - // Severity provides an explicit classification of Reason code, so the users or machines can immediately + // severity provides an explicit classification of Reason code, so the users or machines can immediately // understand the current situation and act accordingly. // The Severity field MUST be set only when Status=False. // +optional diff --git a/internal/apis/core/v1alpha4/machine_types.go b/internal/apis/core/v1alpha4/machine_types.go index 6c9c7875cf74..ef74d2c71036 100644 --- a/internal/apis/core/v1alpha4/machine_types.go +++ b/internal/apis/core/v1alpha4/machine_types.go @@ -56,24 +56,24 @@ const ( // MachineSpec defines the desired state of Machine. type MachineSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Bootstrap is a reference to a local struct which encapsulates + // bootstrap is a reference to a local struct which encapsulates // fields to configure the Machine’s bootstrapping mechanism. Bootstrap Bootstrap `json:"bootstrap"` - // InfrastructureRef is a required reference to a custom resource + // infrastructureRef is a required reference to a custom resource // offered by an infrastructure provider. InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` - // Version defines the desired Kubernetes version. + // version defines the desired Kubernetes version. // This field is meant to be optionally used by bootstrap providers. // +optional Version *string `json:"version,omitempty"` - // ProviderID is the identification ID of the machine provided by the provider. + // providerID is the identification ID of the machine provided by the provider. // This field must match the provider ID as seen on the node object corresponding to this machine. // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler // with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out @@ -86,12 +86,12 @@ type MachineSpec struct { // +optional ProviderID *string `json:"providerID,omitempty"` - // FailureDomain is the failure domain the machine will be created in. + // failureDomain is the failure domain the machine will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // +optional FailureDomain *string `json:"failureDomain,omitempty"` - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. // The default value is 0, meaning that the node can be drained without any time limitations. // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` // +optional @@ -104,27 +104,27 @@ type MachineSpec struct { // MachineStatus defines the observed state of Machine. type MachineStatus struct { - // NodeRef will point to the corresponding Node if it exists. + // nodeRef will point to the corresponding Node if it exists. // +optional NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - // NodeInfo is a set of ids/uuids to uniquely identify the node. + // nodeInfo is a set of ids/uuids to uniquely identify the node. // More info: https://kubernetes.io/docs/concepts/nodes/node/#info // +optional NodeInfo *corev1.NodeSystemInfo `json:"nodeInfo,omitempty"` - // LastUpdated identifies when the phase of the Machine last transitioned. + // lastUpdated identifies when the phase of the Machine last transitioned. // +optional LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - // Version specifies the current version of Kubernetes running + // version specifies the current version of Kubernetes running // on the corresponding Node. This is meant to be a means of bubbling // up status from the Node to the Machine. // It is entirely optional, but useful for end-user UX if it’s present. // +optional Version *string `json:"version,omitempty"` - // FailureReason will be set in the event that there is a terminal problem + // failureReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // @@ -143,7 +143,7 @@ type MachineStatus struct { // +optional FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"` - // FailureMessage will be set in the event that there is a terminal problem + // failureMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // @@ -162,29 +162,29 @@ type MachineStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Addresses is a list of addresses assigned to the machine. + // addresses is a list of addresses assigned to the machine. // This field is copied from the infrastructure provider reference. // +optional Addresses MachineAddresses `json:"addresses,omitempty"` - // Phase represents the current phase of machine actuation. + // phase represents the current phase of machine actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` - // BootstrapReady is the state of the bootstrap provider. + // bootstrapReady is the state of the bootstrap provider. // +optional BootstrapReady bool `json:"bootstrapReady"` - // InfrastructureReady is the state of the infrastructure provider. + // infrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Conditions defines current service state of the Machine. + // conditions defines current service state of the Machine. // +optional Conditions Conditions `json:"conditions,omitempty"` } @@ -218,14 +218,14 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase { // Bootstrap encapsulates fields to configure the Machine’s bootstrapping mechanism. type Bootstrap struct { - // ConfigRef is a reference to a bootstrap provider-specific resource + // configRef is a reference to a bootstrap provider-specific resource // that holds configuration details. The reference is optional to // allow users/operators to specify Bootstrap.DataSecretName without // the need of a controller. // +optional ConfigRef *corev1.ObjectReference `json:"configRef,omitempty"` - // DataSecretName is the name of the secret that stores the bootstrap data script. + // dataSecretName is the name of the secret that stores the bootstrap data script. // If nil, the Machine should remain in the Pending state. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` diff --git a/internal/apis/core/v1alpha4/machinedeployment_types.go b/internal/apis/core/v1alpha4/machinedeployment_types.go index dd71006fe24d..38da6c2d9881 100644 --- a/internal/apis/core/v1alpha4/machinedeployment_types.go +++ b/internal/apis/core/v1alpha4/machinedeployment_types.go @@ -63,7 +63,7 @@ const ( // MachineDeploymentSpec defines the desired state of MachineDeployment. type MachineDeploymentSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` @@ -78,7 +78,7 @@ type MachineDeploymentSpec struct { // It must match the machine template's labels. Selector metav1.LabelSelector `json:"selector"` - // Template describes the machines that will be created. + // template describes the machines that will be created. Template MachineTemplateSpec `json:"template"` // The deployment strategy to use to replace existing machines with @@ -118,7 +118,7 @@ type MachineDeploymentSpec struct { // MachineDeploymentStrategy describes how to replace existing machines // with new ones. type MachineDeploymentStrategy struct { - // Type of deployment. + // type of deployment. // Default is RollingUpdate. // +kubebuilder:validation:Enum=RollingUpdate;OnDelete // +optional @@ -167,7 +167,7 @@ type MachineRollingUpdateDeployment struct { // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` - // DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. + // deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. // Valid values are "Random, "Newest", "Oldest" // When no value is supplied, the default DeletePolicy of MachineSet is used // +kubebuilder:validation:Enum=Random;Newest;Oldest @@ -185,7 +185,7 @@ type MachineDeploymentStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Selector is the same as the label selector but in the string format to avoid introspection + // selector is the same as the label selector but in the string format to avoid introspection // by clients. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional @@ -218,11 +218,11 @@ type MachineDeploymentStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` - // Phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). + // phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). // +optional Phase string `json:"phase,omitempty"` - // Conditions defines current service state of the MachineDeployment. + // conditions defines current service state of the MachineDeployment. // +optional Conditions Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/v1alpha4/machinehealthcheck_types.go b/internal/apis/core/v1alpha4/machinehealthcheck_types.go index 2933768ca88f..8695b2ceeeff 100644 --- a/internal/apis/core/v1alpha4/machinehealthcheck_types.go +++ b/internal/apis/core/v1alpha4/machinehealthcheck_types.go @@ -26,14 +26,14 @@ import ( // MachineHealthCheckSpec defines the desired state of MachineHealthCheck. type MachineHealthCheckSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` // Label selector to match machines whose health will be exercised Selector metav1.LabelSelector `json:"selector"` - // UnhealthyConditions contains a list of the conditions that determine + // unhealthyConditions contains a list of the conditions that determine // whether a node is considered unhealthy. The conditions are combined in a // logical OR, i.e. if any of the conditions is met, the node is unhealthy. // @@ -61,7 +61,7 @@ type MachineHealthCheckSpec struct { // +optional NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - // RemediationTemplate is a reference to a remediation template + // remediationTemplate is a reference to a remediation template // provided by an infrastructure provider. // // This field is completely optional, when filled, the MachineHealthCheck controller @@ -104,20 +104,20 @@ type MachineHealthCheckStatus struct { // +kubebuilder:validation:Minimum=0 CurrentHealthy int32 `json:"currentHealthy,omitempty"` - // RemediationsAllowed is the number of further remediations allowed by this machine health check before + // remediationsAllowed is the number of further remediations allowed by this machine health check before // maxUnhealthy short circuiting will be applied // +kubebuilder:validation:Minimum=0 RemediationsAllowed int32 `json:"remediationsAllowed,omitempty"` - // ObservedGeneration is the latest generation observed by the controller. + // observedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Targets shows the current list of machines the machine health check is watching + // targets shows the current list of machines the machine health check is watching // +optional Targets []string `json:"targets,omitempty"` - // Conditions defines current service state of the MachineHealthCheck. + // conditions defines current service state of the MachineHealthCheck. // +optional Conditions Conditions `json:"conditions,omitempty"` } diff --git a/internal/apis/core/v1alpha4/machineset_types.go b/internal/apis/core/v1alpha4/machineset_types.go index 59c2bb7a106c..70a81a041f09 100644 --- a/internal/apis/core/v1alpha4/machineset_types.go +++ b/internal/apis/core/v1alpha4/machineset_types.go @@ -35,34 +35,34 @@ const ( // MachineSetSpec defines the desired state of MachineSet. type MachineSetSpec struct { - // ClusterName is the name of the Cluster this object belongs to. + // clusterName is the name of the Cluster this object belongs to. // +kubebuilder:validation:MinLength=1 ClusterName string `json:"clusterName"` - // Replicas is the number of desired replicas. + // replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. // +optional // +kubebuilder:default=1 Replicas *int32 `json:"replicas,omitempty"` - // MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready. + // 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"` - // DeletePolicy defines the policy used to identify nodes to delete when downscaling. + // deletePolicy defines the policy used to identify nodes to delete when downscaling. // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" // +kubebuilder:validation:Enum=Random;Newest;Oldest DeletePolicy string `json:"deletePolicy,omitempty"` - // Selector is a label query over machines that should match the replica count. + // selector is a label query over machines that should match the replica count. // Label keys and values that must match in order to be controlled by this MachineSet. // It must match the machine template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector metav1.LabelSelector `json:"selector"` - // Template is the object that describes the machine that will be created if + // template is the object that describes the machine that will be created if // insufficient replicas are detected. // Object references to custom resources are treated as templates. // +optional @@ -116,13 +116,13 @@ const ( // MachineSetStatus defines the observed state of MachineSet. type MachineSetStatus struct { - // Selector is the same as the label selector but in the string format to avoid introspection + // selector is the same as the label selector but in the string format to avoid introspection // by clients. The string will be in the same format as the query-param syntax. // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors // +optional Selector string `json:"selector,omitempty"` - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. // +optional Replicas int32 `json:"replicas,omitempty"` @@ -138,7 +138,7 @@ type MachineSetStatus struct { // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // ObservedGeneration reflects the generation of the most recently observed MachineSet. + // observedGeneration reflects the generation of the most recently observed MachineSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` @@ -164,7 +164,7 @@ type MachineSetStatus struct { FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"` // +optional FailureMessage *string `json:"failureMessage,omitempty"` - // Conditions defines current service state of the MachineSet. + // conditions defines current service state of the MachineSet. // +optional Conditions Conditions `json:"conditions,omitempty"` }