You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add and remove exclude-from-external-load-balancers label (#582)
* add and remove exclude-from-external-load-balancers label
* move dry run after checking the label's value
* update helm and helm README
* wording nit
Copy file name to clipboardExpand all lines: config/helm/aws-node-termination-handler/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ The configuration in this table applies to all AWS Node Termination Handler mode
76
76
|`dryRun`| If `true`, only log if a node would be drained. |`false`|
77
77
|`cordonOnly`| If `true`, nodes will be cordoned but not drained when an interruption event occurs. |`false`|
78
78
|`taintNode`| If `true`, nodes will be tainted when an interruption event occurs. Currently used taint keys are `aws-node-termination-handler/scheduled-maintenance`, `aws-node-termination-handler/spot-itn`, `aws-node-termination-handler/asg-lifecycle-termination` and `aws-node-termination-handler/rebalance-recommendation`. |`false`|
79
+
|`excludeFromLoadBalancers`| If `true`, nodes will be marked for exclusion from load balancers before they are cordoned. This applies the `node.kubernetes.io/exclude-from-external-load-balancers` label to enable the ServiceNodeExclusion feature gate. The label will not be modified or removed for nodes that already have it. |`false`|
79
80
|`deleteLocalData`| If `true`, continue even if there are pods using local data that will be deleted when the node is drained. |`true`|
80
81
|`ignoreDaemonSets`| If `true`, skip terminating daemon set managed pods. |`true`|
81
82
|`podTerminationGracePeriod`| The time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used, which defaults to 30 seconds if not specified for the pod. |`-1`|
flag.BoolVar(&config.CordonOnly, "cordon-only", getBoolEnv(cordonOnly, false), "If true, nodes will be cordoned but not drained when an interruption event occurs.")
180
182
flag.BoolVar(&config.TaintNode, "taint-node", getBoolEnv(taintNode, false), "If true, nodes will be tainted when an interruption event occurs.")
181
183
flag.StringVar(&config.TaintEffect, "taint-effect", getEnv(taintEffect, taintEffectDefault), "Sets the effect when a node is tainted.")
184
+
flag.BoolVar(&config.ExcludeFromLoadBalancers, "exclude-from-load-balancers", getBoolEnv(excludeFromLoadBalancers, false), "If true, nodes will be marked for exclusion from load balancers when an interruption event occurs.")
182
185
flag.BoolVar(&config.JsonLogging, "json-logging", getBoolEnv(jsonLoggingConfigKey, jsonLoggingDefault), "If true, use JSON-formatted logs instead of human readable logs.")
183
186
flag.StringVar(&config.LogLevel, "log-level", getEnv(logLevelConfigKey, logLevelDefault), "Sets the log level (INFO, DEBUG, or ERROR)")
184
187
flag.StringVar(&config.UptimeFromFile, "uptime-from-file", getEnv(uptimeFromFileConfigKey, uptimeFromFileDefault), "If specified, read system uptime from the file path (useful for testing).")
returnfmt.Errorf("Unable to label node with event ID %s=%s: %w", EventIDLabelKey, eventID, err)
167
176
}
168
177
returnnil
169
178
}
170
179
180
+
// MaybeMarkForExclusionFromLoadBalancers will activate the ServiceNodeExclusion feature flag to indicate that the node should be removed from load balancers
0 commit comments