Skip to content

Commit ac593b2

Browse files
authored
Merge pull request #18140 from rifelpet/nth-out-of-service
aws: Add EnableOutOfServiceTaint field to NodeTerminationHandler
2 parents 440ba63 + 25122c8 commit ac593b2

File tree

215 files changed

+1088
-464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+1088
-464
lines changed

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6218,6 +6218,12 @@ spec:
62186218
Only used in Queue Processor mode.
62196219
Default: false
62206220
type: boolean
6221+
enableOutOfServiceTaint:
6222+
description: |-
6223+
EnableOutOfServiceTaint makes node termination handler apply the node.kubernetes.io/out-of-service taint
6224+
to nodes during non-graceful shutdown, allowing Kubernetes to quickly detach volumes and reschedule pods.
6225+
Default: false
6226+
type: boolean
62216227
enableRebalanceDraining:
62226228
description: |-
62236229
EnableRebalanceDraining makes node termination handler drain nodes when the rebalance recommendation notice is received.

pkg/apis/kops/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,11 @@ type NodeTerminationHandlerSpec struct {
10391039
// Default: false
10401040
EnableRebalanceDraining *bool `json:"enableRebalanceDraining,omitempty"`
10411041

1042+
// EnableOutOfServiceTaint makes node termination handler apply the node.kubernetes.io/out-of-service taint
1043+
// to nodes during non-graceful shutdown, allowing Kubernetes to quickly detach volumes and reschedule pods.
1044+
// Default: false
1045+
EnableOutOfServiceTaint *bool `json:"enableOutOfServiceTaint,omitempty"`
1046+
10421047
// EnablePrometheusMetrics enables the "/metrics" endpoint.
10431048
// Default: false
10441049
EnablePrometheusMetrics *bool `json:"prometheusEnable,omitempty"`

pkg/apis/kops/v1alpha2/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,11 @@ type NodeTerminationHandlerSpec struct {
11091109
// Default: false
11101110
EnableRebalanceDraining *bool `json:"enableRebalanceDraining,omitempty"`
11111111

1112+
// EnableOutOfServiceTaint makes node termination handler apply the node.kubernetes.io/out-of-service taint
1113+
// to nodes during non-graceful shutdown, allowing Kubernetes to quickly detach volumes and reschedule pods.
1114+
// Default: false
1115+
EnableOutOfServiceTaint *bool `json:"enableOutOfServiceTaint,omitempty"`
1116+
11121117
// EnablePrometheusMetrics enables the "/metrics" endpoint.
11131118
// Default: false
11141119
EnablePrometheusMetrics *bool `json:"prometheusEnable,omitempty"`

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

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

pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

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

pkg/apis/kops/v1alpha3/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,11 @@ type NodeTerminationHandlerSpec struct {
10351035
// Default: false
10361036
EnableRebalanceDraining *bool `json:"enableRebalanceDraining,omitempty"`
10371037

1038+
// EnableOutOfServiceTaint makes node termination handler apply the node.kubernetes.io/out-of-service taint
1039+
// to nodes during non-graceful shutdown, allowing Kubernetes to quickly detach volumes and reschedule pods.
1040+
// Default: false
1041+
EnableOutOfServiceTaint *bool `json:"enableOutOfServiceTaint,omitempty"`
1042+
10381043
// EnablePrometheusMetrics enables the "/metrics" endpoint.
10391044
// Default: false
10401045
EnablePrometheusMetrics *bool `json:"prometheusEnable,omitempty"`

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

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

pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

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

pkg/apis/kops/zz_generated.deepcopy.go

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

pkg/model/components/nodeterminationhandler.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ func (b *NodeTerminationHandlerOptionsBuilder) BuildOptions(o *kops.Cluster) err
6666
nth.EnableRebalanceDraining = fi.PtrTo(false)
6767
}
6868

69+
if nth.EnableOutOfServiceTaint == nil {
70+
nth.EnableOutOfServiceTaint = fi.PtrTo(false)
71+
}
72+
6973
if nth.EnablePrometheusMetrics == nil {
7074
nth.EnablePrometheusMetrics = fi.PtrTo(false)
7175
}
@@ -97,7 +101,7 @@ func (b *NodeTerminationHandlerOptionsBuilder) BuildOptions(o *kops.Cluster) err
97101
}
98102

99103
if nth.Version == nil {
100-
nth.Version = fi.PtrTo("v1.22.0")
104+
nth.Version = fi.PtrTo("v1.25.5")
101105
}
102106

103107
return nil

0 commit comments

Comments
 (0)