mirror of https://github.com/kubernetes/kops.git
Merge pull request #12083 from CheyiLin/nth
Add nth rebalance recommendation configs
This commit is contained in:
commit
283080bc30
|
|
@ -4129,6 +4129,16 @@ spec:
|
|||
Default: 50m'
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
enableRebalanceDraining:
|
||||
description: 'EnableRebalanceDraining makes node termination handler
|
||||
drain nodes when the rebalance recommendation notice is received
|
||||
Default: false'
|
||||
type: boolean
|
||||
enableRebalanceMonitoring:
|
||||
description: 'EnableRebalanceMonitoring makes node termination
|
||||
handler cordon nodes when the rebalance recommendation notice
|
||||
is received Default: false'
|
||||
type: boolean
|
||||
enableSQSTerminationDraining:
|
||||
description: EnableSQSTerminationDraining enables queue-processor
|
||||
mode which drains nodes when an SQS termination event is received.
|
||||
|
|
|
|||
|
|
@ -896,6 +896,12 @@ type NodeTerminationHandlerConfig struct {
|
|||
// EnableScheduledEventDraining makes node termination handler drain nodes before the maintenance window starts for an EC2 instance scheduled event.
|
||||
// Default: false
|
||||
EnableScheduledEventDraining *bool `json:"enableScheduledEventDraining,omitempty"`
|
||||
// EnableRebalanceMonitoring makes node termination handler cordon nodes when the rebalance recommendation notice is received
|
||||
// Default: false
|
||||
EnableRebalanceMonitoring *bool `json:"enableRebalanceMonitoring,omitempty"`
|
||||
// EnableRebalanceDraining makes node termination handler drain nodes when the rebalance recommendation notice is received
|
||||
// Default: false
|
||||
EnableRebalanceDraining *bool `json:"enableRebalanceDraining,omitempty"`
|
||||
|
||||
// EnablePrometheusMetrics enables the "/metrics" endpoint.
|
||||
EnablePrometheusMetrics *bool `json:"prometheusEnable,omitempty"`
|
||||
|
|
|
|||
|
|
@ -895,6 +895,12 @@ type NodeTerminationHandlerConfig struct {
|
|||
// EnableScheduledEventDraining makes node termination handler drain nodes before the maintenance window starts for an EC2 instance scheduled event.
|
||||
// Default: false
|
||||
EnableScheduledEventDraining *bool `json:"enableScheduledEventDraining,omitempty"`
|
||||
// EnableRebalanceMonitoring makes node termination handler cordon nodes when the rebalance recommendation notice is received
|
||||
// Default: false
|
||||
EnableRebalanceMonitoring *bool `json:"enableRebalanceMonitoring,omitempty"`
|
||||
// EnableRebalanceDraining makes node termination handler drain nodes when the rebalance recommendation notice is received
|
||||
// Default: false
|
||||
EnableRebalanceDraining *bool `json:"enableRebalanceDraining,omitempty"`
|
||||
|
||||
// EnablePrometheusMetrics enables the "/metrics" endpoint.
|
||||
EnablePrometheusMetrics *bool `json:"prometheusEnable,omitempty"`
|
||||
|
|
|
|||
|
|
@ -6016,6 +6016,8 @@ func autoConvert_v1alpha2_NodeTerminationHandlerConfig_To_kops_NodeTerminationHa
|
|||
out.Enabled = in.Enabled
|
||||
out.EnableSpotInterruptionDraining = in.EnableSpotInterruptionDraining
|
||||
out.EnableScheduledEventDraining = in.EnableScheduledEventDraining
|
||||
out.EnableRebalanceMonitoring = in.EnableRebalanceMonitoring
|
||||
out.EnableRebalanceDraining = in.EnableRebalanceDraining
|
||||
out.EnablePrometheusMetrics = in.EnablePrometheusMetrics
|
||||
out.EnableSQSTerminationDraining = in.EnableSQSTerminationDraining
|
||||
out.ManagedASGTag = in.ManagedASGTag
|
||||
|
|
@ -6033,6 +6035,8 @@ func autoConvert_kops_NodeTerminationHandlerConfig_To_v1alpha2_NodeTerminationHa
|
|||
out.Enabled = in.Enabled
|
||||
out.EnableSpotInterruptionDraining = in.EnableSpotInterruptionDraining
|
||||
out.EnableScheduledEventDraining = in.EnableScheduledEventDraining
|
||||
out.EnableRebalanceMonitoring = in.EnableRebalanceMonitoring
|
||||
out.EnableRebalanceDraining = in.EnableRebalanceDraining
|
||||
out.EnablePrometheusMetrics = in.EnablePrometheusMetrics
|
||||
out.EnableSQSTerminationDraining = in.EnableSQSTerminationDraining
|
||||
out.ManagedASGTag = in.ManagedASGTag
|
||||
|
|
|
|||
|
|
@ -4047,6 +4047,16 @@ func (in *NodeTerminationHandlerConfig) DeepCopyInto(out *NodeTerminationHandler
|
|||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnableRebalanceMonitoring != nil {
|
||||
in, out := &in.EnableRebalanceMonitoring, &out.EnableRebalanceMonitoring
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnableRebalanceDraining != nil {
|
||||
in, out := &in.EnableRebalanceDraining, &out.EnableRebalanceDraining
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnablePrometheusMetrics != nil {
|
||||
in, out := &in.EnablePrometheusMetrics, &out.EnablePrometheusMetrics
|
||||
*out = new(bool)
|
||||
|
|
|
|||
|
|
@ -4229,6 +4229,16 @@ func (in *NodeTerminationHandlerConfig) DeepCopyInto(out *NodeTerminationHandler
|
|||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnableRebalanceMonitoring != nil {
|
||||
in, out := &in.EnableRebalanceMonitoring, &out.EnableRebalanceMonitoring
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnableRebalanceDraining != nil {
|
||||
in, out := &in.EnableRebalanceDraining, &out.EnableRebalanceDraining
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnablePrometheusMetrics != nil {
|
||||
in, out := &in.EnablePrometheusMetrics, &out.EnablePrometheusMetrics
|
||||
*out = new(bool)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ func (b *NodeTerminationHandlerOptionsBuilder) BuildOptions(o interface{}) error
|
|||
if nth.EnableScheduledEventDraining == nil {
|
||||
nth.EnableScheduledEventDraining = fi.Bool(false)
|
||||
}
|
||||
if nth.EnableRebalanceMonitoring == nil {
|
||||
nth.EnableRebalanceMonitoring = fi.Bool(false)
|
||||
}
|
||||
if nth.EnableRebalanceDraining == nil {
|
||||
nth.EnableRebalanceDraining = fi.Bool(false)
|
||||
}
|
||||
|
||||
if nth.EnablePrometheusMetrics == nil {
|
||||
nth.EnablePrometheusMetrics = fi.Bool(false)
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@ spec:
|
|||
amazonvpc: {}
|
||||
nodeTerminationHandler:
|
||||
cpuRequest: 50m
|
||||
enableRebalanceDraining: false
|
||||
enableRebalanceMonitoring: false
|
||||
enableSQSTerminationDraining: false
|
||||
enableScheduledEventDraining: false
|
||||
enableSpotInterruptionDraining: true
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ spec:
|
|||
selector: null
|
||||
- id: k8s-1.11
|
||||
manifest: node-termination-handler.aws/k8s-1.11.yaml
|
||||
manifestHash: 74c5be2d69091521e7dca1fbadeef7548ce4277791ae161a6097400a57fcd889
|
||||
manifestHash: 964641df31815a1c0740ac78a342fc422676509c05ec8f090368b3c4b16a8e13
|
||||
name: node-termination-handler.aws
|
||||
selector:
|
||||
k8s-addon: node-termination-handler.aws
|
||||
|
|
|
|||
|
|
@ -152,6 +152,10 @@ spec:
|
|||
value: "true"
|
||||
- name: ENABLE_SCHEDULED_EVENT_DRAINING
|
||||
value: "false"
|
||||
- name: ENABLE_REBALANCE_MONITORING
|
||||
value: "false"
|
||||
- name: ENABLE_REBALANCE_DRAINING
|
||||
value: "false"
|
||||
- name: JSON_LOGGING
|
||||
value: "true"
|
||||
- name: ENABLE_PROMETHEUS_SERVER
|
||||
|
|
|
|||
|
|
@ -169,6 +169,8 @@ spec:
|
|||
cni: {}
|
||||
nodeTerminationHandler:
|
||||
cpuRequest: 50m
|
||||
enableRebalanceDraining: false
|
||||
enableRebalanceMonitoring: false
|
||||
enableSQSTerminationDraining: true
|
||||
enableScheduledEventDraining: false
|
||||
enableSpotInterruptionDraining: true
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ spec:
|
|||
k8s-addon: dns-controller.addons.k8s.io
|
||||
- id: k8s-1.11
|
||||
manifest: node-termination-handler.aws/k8s-1.11.yaml
|
||||
manifestHash: 60d44ad0227aad24f8d35242da335e7b2c046de3936597a744cba0e55a579fec
|
||||
manifestHash: 2fbd4c41bf3c8cfd8651b82cc9335431f0ad5931abb82b92dbb4fe713df2e1aa
|
||||
name: node-termination-handler.aws
|
||||
selector:
|
||||
k8s-addon: node-termination-handler.aws
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ spec:
|
|||
value: "false"
|
||||
- name: ENABLE_REBALANCE_MONITORING
|
||||
value: "false"
|
||||
- name: ENABLE_REBALANCE_DRAINING
|
||||
value: "false"
|
||||
- name: ENABLE_SQS_TERMINATION_DRAINING
|
||||
value: "true"
|
||||
- name: QUEUE_URL
|
||||
|
|
|
|||
|
|
@ -180,6 +180,8 @@ spec:
|
|||
value: "false"
|
||||
- name: ENABLE_REBALANCE_MONITORING
|
||||
value: "false"
|
||||
- name: ENABLE_REBALANCE_DRAINING
|
||||
value: "false"
|
||||
- name: ENABLE_SQS_TERMINATION_DRAINING
|
||||
value: "true"
|
||||
- name: QUEUE_URL
|
||||
|
|
@ -301,6 +303,10 @@ spec:
|
|||
value: "{{ .EnableSpotInterruptionDraining }}"
|
||||
- name: ENABLE_SCHEDULED_EVENT_DRAINING
|
||||
value: "{{ .EnableScheduledEventDraining }}"
|
||||
- name: ENABLE_REBALANCE_MONITORING
|
||||
value: "{{ .EnableRebalanceMonitoring }}"
|
||||
- name: ENABLE_REBALANCE_DRAINING
|
||||
value: "{{ .EnableRebalanceDraining }}"
|
||||
- name: JSON_LOGGING
|
||||
value: "true"
|
||||
- name: ENABLE_PROMETHEUS_SERVER
|
||||
|
|
|
|||
Loading…
Reference in New Issue