Skip to content

Commit d09791b

Browse files
Address review comments (Stefan)
Signed-off-by: Furkat Gofurov <[email protected]>
1 parent 4c1004f commit d09791b

File tree

8 files changed

+14
-32
lines changed

8 files changed

+14
-32
lines changed

api/core/v1beta2/machinehealthcheck_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ type UnhealthyMachineCondition struct {
252252
// +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
253253
// +kubebuilder:validation:MinLength=1
254254
// +kubebuilder:validation:MaxLength=316
255-
// +kubebuilder:validation:XValidation:rule="self != 'Ready' && self != 'Available' && self != 'HealthCheckSucceeded' && self != 'OwnerRemediated' && self != 'ExternallyRemediated'",message="type must not be one of: Ready, Available, HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated"
255+
// +kubebuilder:validation:XValidation:rule="!(self in ['Ready','Available','HealthCheckSucceeded','OwnerRemediated','ExternallyRemediated'])",message="type must not be one of: Ready, Available, HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated"
256256
// +required
257257
Type string `json:"type,omitempty"`
258258

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

Lines changed: 2 additions & 6 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_clusters.yaml

Lines changed: 2 additions & 7 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_machinehealthchecks.yaml

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

internal/controllers/machinehealthcheck/machinehealthcheck_targets.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ const (
4545

4646
// EventMachineMarkedUnhealthy is emitted when machine was successfully marked as unhealthy.
4747
EventMachineMarkedUnhealthy string = "MachineMarkedUnhealthy"
48-
// EventDetectedUnhealthy is emitted in case a machine or its associated
49-
// node was detected unhealthy.
50-
EventDetectedUnhealthy string = "DetectedUnhealthy"
5148
)
5249

5350
var (

internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,6 @@ func newTestUnhealthyMachine(name, namespace, clusterName, nodeName string, labe
709709

710710
bootstrap := "bootstrap"
711711
return &clusterv1.Machine{
712-
TypeMeta: metav1.TypeMeta{
713-
APIVersion: clusterv1.GroupVersion.String(),
714-
Kind: "Machine",
715-
},
716712
ObjectMeta: metav1.ObjectMeta{
717713
Name: name,
718714
Namespace: namespace,

test/infrastructure/docker/templates/clusterclass-in-memory.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ spec:
127127
status: "False"
128128
timeoutSeconds: 300
129129
unhealthyMachineConditions:
130-
- type: "Ready"
130+
- type: "NodeReady"
131131
status: Unknown
132132
timeoutSeconds: 300
133-
- type: "Ready"
133+
- type: "NodeReady"
134134
status: "False"
135135
timeoutSeconds: 300
136136
infrastructure:
@@ -161,9 +161,9 @@ spec:
161161
status: "False"
162162
timeoutSeconds: 300
163163
unhealthyMachineConditions:
164-
- type: "Ready"
164+
- type: "NodeReady"
165165
status: Unknown
166166
timeoutSeconds: 300
167-
- type: "Ready"
167+
- type: "NodeReady"
168168
status: "False"
169169
timeoutSeconds: 300

test/infrastructure/docker/templates/clusterclass-quick-start.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ spec:
2323
status: "False"
2424
timeoutSeconds: 300
2525
unhealthyMachineConditions:
26-
- type: "Ready"
26+
- type: "NodeReady"
2727
status: Unknown
2828
timeoutSeconds: 300
29-
- type: "Ready"
29+
- type: "NodeReady"
3030
status: "False"
3131
timeoutSeconds: 300
3232
infrastructure:
@@ -57,10 +57,10 @@ spec:
5757
status: "False"
5858
timeoutSeconds: 300
5959
unhealthyMachineConditions:
60-
- type: "Ready"
60+
- type: "NodeReady"
6161
status: Unknown
6262
timeoutSeconds: 300
63-
- type: "Ready"
63+
- type: "NodeReady"
6464
status: "False"
6565
timeoutSeconds: 300
6666
machinePools:

0 commit comments

Comments
 (0)