Optional removal of node taint on successful IP assignment #146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a feature that allows removal of a node taint upon a successful IP address assignment. Using this should avoid potential race conditions where workloads may be scheduled on newly provisioned nodes before KubeIP has completed the IP assignment. I have tested this on a GKE cluster, but not in AWS. There shouldn't be anything vendor-specific here.
The specific use case we have for this is that we run some jobs on elastic/autoscaling node pools, which call services with IP-whitelisting. We had observed that in rare cases, it would take a while (up to a minute) for the nodes to receive their IP addresses, and meanwhile workloads were free to be scheduled on the nodes. We wanted to ensure that calls to these services were not made before the node had received a static IP address.
This should be backwards-compatible with current deployments of KubeIP, and if the feature is not enabled then it should behave exactly as it does currently.
Using this feature requires an additional, potentially sensitive permission on the ClusterRole. This is explained in the readme, but not using the feature (i.e. not explicitly setting the
taint-key
configuration option) does not require any additional permissions, and it will still work with only the "get" permission.