annotate fakeNodes so that cloudprovider implementations can identify them #4119
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 adds an annotation to the "fakeNode" used by CA for unregistered node. This can be useful for cloudproviders in the
DeleteNode()method to have some custom error handling logic and also identify the reason for thefakeNode. (For now, it seems only GCE would make use of the nodes created with error path)An example of how we want to leverage that: we don't want to decrement the cached NodeGroup capacity in Azure because the capacity reported by APIs won't include Failed instances so the cache will end up drifting unnecessarily from the real capacity and can inadvertently lead to a scale down if some conditions align.
I've noticed the packet provider tries to identify some via providerId but I don't think this is a reliable way. Similar with the magnum provider via the object UID. I think a namespaced annotation would be a convenient way for identification.