Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Add missing comments with serialized prefix #11807

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/v1beta1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ type ClusterSpec struct {
// +optional
InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"`

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

// NetworkRanges represents ranges of network addresses.
type NetworkRanges struct {
// cidrBlocks is a list of CIDR blocks.
CIDRBlocks []string `json:"cidrBlocks"`
}

Expand Down
6 changes: 4 additions & 2 deletions api/v1beta1/clusterclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,15 @@ type MachineHealthCheckClass struct {
// +optional
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"`

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

// unhealthyRange specifies the range of unhealthy machines allowed.
// Any further remediation is only allowed if the number of machines selected by "selector" as not healthy
// is within the range of "UnhealthyRange". Takes precedence over MaxUnhealthy.
// is within the range of "unhealthyRange". Takes precedence over maxUnhealthy.
// Eg. "[3-5]" - This means that remediation will be allowed only when:
// (a) there are at least 3 unhealthy machines (and)
// (b) there are at most 5 unhealthy machines
Expand Down
12 changes: 10 additions & 2 deletions api/v1beta1/machinehealthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,18 @@ type MachineHealthCheckSpec struct {
// +optional
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"`

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

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

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

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

Expand Down
10 changes: 10 additions & 0 deletions api/v1beta1/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ type MachineSetStatus struct {
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`

// 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.
//
// In the event that there is a terminal problem reconciling the
// replicas, both FailureReason and FailureMessage will be set. FailureReason
// will be populated with a succinct value suitable for machine
Expand All @@ -332,10 +336,16 @@ type MachineSetStatus struct {
//
// +optional
FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"`

// 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.
//
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
//
// +optional
FailureMessage *string `json:"failureMessage,omitempty"`

// conditions defines current service state of the MachineSet.
// +optional
Conditions Conditions `json:"conditions,omitempty"`
Expand Down
38 changes: 21 additions & 17 deletions api/v1beta1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion bootstrap/kubeadm/api/v1beta1/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,9 @@ type KubeConfigAuthExec struct {
// KubeConfigAuthExecEnv is used for setting environment variables when executing an exec-based
// credential plugin.
type KubeConfigAuthExecEnv struct {
Name string `json:"name"`
// name of the environment variable
Name string `json:"name"`
// value of the environment variable
Value string `json:"value"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

// KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate.
type KubeadmConfigTemplateSpec struct {
// template defines the desired state of KubeadmConfigTemplate.
Template KubeadmConfigTemplateResource `json:"template"`
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading