Skip to content

Commit 0cbec69

Browse files
committed
Add RemediationStragegy API field
1 parent 8b8563a commit 0cbec69

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

install/0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ spec:
3232
spec:
3333
description: Specification of machine health check policy
3434
properties:
35+
remediationStrategy:
36+
description: RemediationStrategy to use in case of problem detection
37+
default is machine deletion
38+
type: string
3539
selector:
3640
description: Label selector to match machines whose health will be exercised
3741
type: object
3842
required:
43+
- remediationStrategy
3944
- selector
4045
type: object
4146
status:

pkg/apis/healthchecking/v1alpha1/machinehealthcheck_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
// ConfigMapNodeUnhealthyConditions contains the name of the unhealthy conditions config map
88
const ConfigMapNodeUnhealthyConditions = "node-unhealthy-conditions"
99

10+
type RemediationStrategyType string
11+
1012
// +genclient
1113
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
1214

@@ -36,6 +38,9 @@ type MachineHealthCheckList struct {
3638

3739
// MachineHealthCheckSpec defines the desired state of MachineHealthCheck
3840
type MachineHealthCheckSpec struct {
41+
// RemediationStrategy to use in case of problem detection
42+
// default is machine deletion
43+
RemediationStrategy RemediationStrategyType `json:"remediationStrategy"`
3944
// Label selector to match machines whose health will be exercised
4045
Selector metav1.LabelSelector `json:"selector"`
4146
}

pkg/generated/clientset/versioned/clientset.go

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

pkg/generated/clientset/versioned/fake/clientset_generated.go

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

0 commit comments

Comments
 (0)