Skip to content

Commit e4ed962

Browse files
committed
Improve godoc
1 parent 9194d44 commit e4ed962

7 files changed

+120
-30
lines changed

api/core/v1beta2/cluster_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,19 @@ type ControlPlaneTopologyHealthCheck struct {
657657
Enabled *bool `json:"enabled,omitempty"`
658658

659659
// checks are the checks that are used to evaluate if a Machine is healthy.
660+
// Even if checks is not set, the MachineHealthCheck controller will still
661+
// flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and
662+
// Machines with deleted Nodes as unhealthy. Furthermore, nodeStartupTimeoutSeconds
663+
// is defaulted to 10 minutes and evaluated accordingly.
660664
// +optional
661665
Checks ControlPlaneTopologyHealthCheckChecks `json:"checks,omitempty,omitzero"`
662666

663667
// remediation configures if and how remediations are triggered if a Machine is unhealthy.
668+
// If remediation is not set (and thus triggerIf is not set), remediation will always be
669+
// triggered for unhealthy Machines.
670+
// If remediation is not set (and thus templateRef is not set), the OwnerRemediated condition
671+
// will be set on unhealthy Machines to trigger remediation via the owner of the Machines,
672+
// for example a MachineSet or a KubeadmControlPlane.
664673
// +optional
665674
Remediation ControlPlaneTopologyHealthCheckRemediation `json:"remediation,omitempty,omitzero"`
666675
}
@@ -882,10 +891,19 @@ type MachineDeploymentTopologyHealthCheck struct {
882891
Enabled *bool `json:"enabled,omitempty"`
883892

884893
// checks are the checks that are used to evaluate if a Machine is healthy.
894+
// Even if checks is not set, the MachineHealthCheck controller will still
895+
// flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and
896+
// Machines with deleted Nodes as unhealthy. Furthermore, nodeStartupTimeoutSeconds
897+
// is defaulted to 10 minutes and evaluated accordingly.
885898
// +optional
886899
Checks MachineDeploymentTopologyHealthCheckChecks `json:"checks,omitempty,omitzero"`
887900

888901
// remediation configures if and how remediations are triggered if a Machine is unhealthy.
902+
// If remediation is not set (and thus triggerIf is not set), remediation will always be
903+
// triggered for unhealthy Machines.
904+
// If remediation is not set (and thus templateRef is not set), the OwnerRemediated condition
905+
// will be set on unhealthy Machines to trigger remediation via the owner of the Machines,
906+
// for example a MachineSet or a KubeadmControlPlane.
889907
// +optional
890908
Remediation MachineDeploymentTopologyHealthCheckRemediation `json:"remediation,omitempty,omitzero"`
891909
}

api/core/v1beta2/clusterclass_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,19 @@ type ControlPlaneClass struct {
202202
// +kubebuilder:validation:MinProperties=1
203203
type ControlPlaneClassHealthCheck struct {
204204
// checks are the checks that are used to evaluate if a Machine is healthy.
205+
// Even if checks is not set, the MachineHealthCheck controller will still
206+
// flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and
207+
// Machines with deleted Nodes as unhealthy. Furthermore, nodeStartupTimeoutSeconds
208+
// is defaulted to 10 minutes and evaluated accordingly.
205209
// +optional
206210
Checks ControlPlaneClassHealthCheckChecks `json:"checks,omitempty,omitzero"`
207211

208212
// remediation configures if and how remediations are triggered if a Machine is unhealthy.
213+
// If remediation is not set (and thus triggerIf is not set), remediation will always be
214+
// triggered for unhealthy Machines.
215+
// If remediation is not set (and thus templateRef is not set), the OwnerRemediated condition
216+
// will be set on unhealthy Machines to trigger remediation via the owner of the Machines,
217+
// for example a MachineSet or a KubeadmControlPlane.
209218
// +optional
210219
Remediation ControlPlaneClassHealthCheckRemediation `json:"remediation,omitempty,omitzero"`
211220
}
@@ -439,10 +448,19 @@ type MachineDeploymentClass struct {
439448
// +kubebuilder:validation:MinProperties=1
440449
type MachineDeploymentClassHealthCheck struct {
441450
// checks are the checks that are used to evaluate if a Machine is healthy.
451+
// Even if checks is not set, the MachineHealthCheck controller will still
452+
// flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and
453+
// Machines with deleted Nodes as unhealthy. Furthermore, nodeStartupTimeoutSeconds
454+
// is defaulted to 10 minutes and evaluated accordingly.
442455
// +optional
443456
Checks MachineDeploymentClassHealthCheckChecks `json:"checks,omitempty,omitzero"`
444457

445458
// remediation configures if and how remediations are triggered if a Machine is unhealthy.
459+
// If remediation is not set (and thus triggerIf is not set), remediation will always be
460+
// triggered for unhealthy Machines.
461+
// If remediation is not set (and thus templateRef is not set), the OwnerRemediated condition
462+
// will be set on unhealthy Machines to trigger remediation via the owner of the Machines,
463+
// for example a MachineSet or a KubeadmControlPlane.
446464
// +optional
447465
Remediation MachineDeploymentClassHealthCheckRemediation `json:"remediation,omitempty,omitzero"`
448466
}

api/core/v1beta2/machinehealthcheck_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,19 @@ type MachineHealthCheckSpec struct {
6161
Selector metav1.LabelSelector `json:"selector"`
6262

6363
// checks are the checks that are used to evaluate if a Machine is healthy.
64+
// Even if checks is not set, the MachineHealthCheck controller will still
65+
// flag Machines with `cluster.x-k8s.io/remediate-machine` annotation and
66+
// Machines with deleted Nodes as unhealthy. Furthermore, nodeStartupTimeoutSeconds
67+
// is defaulted to 10 minutes and evaluated accordingly.
6468
// +optional
6569
Checks MachineHealthCheckChecks `json:"checks,omitempty,omitzero"`
6670

6771
// remediation configures if and how remediations are triggered if a Machine is unhealthy.
72+
// If remediation is not set (and thus triggerIf is not set), remediation will always be
73+
// triggered for unhealthy Machines.
74+
// If remediation is not set (and thus templateRef is not set), the OwnerRemediated condition
75+
// will be set on unhealthy Machines to trigger remediation via the owner of the Machines,
76+
// for example a MachineSet or a KubeadmControlPlane.
6877
// +optional
6978
Remediation MachineHealthCheckRemediation `json:"remediation,omitempty,omitzero"`
7079
}

api/core/v1beta2/zz_generated.openapi.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml

Lines changed: 26 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)