Add SSA merge strategy to container NodePool's nodeConfig to avoid fights over ownership. #457
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.
Description of your changes
The NodePool nodeConfig is a singleton list containing the node config for the pool. By default lists are treated as atomic by server-side-apply, which means only one manager can own them. nodeConfig contains fields resolved by the provider (service account) so if you also try to patch some of the other fields with a composition function then the provider and composition repeatedly delete each others fields.
The ListTypeMap strategy treats the list elements similarly to a granular map, which is what we need, but it requires a key by which to identify each element of the list. There is no such key for nodeConfig, but since it's a singleton we can inject a default using a non-existent name with a fixed value.
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Running in kind against GKE, checking audit log to make sure the resource isn't being repeatedly updated.