Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSA merge strategy to container NodePool's nodeConfig to avoid fights over ownership. #457

Conversation

JonathanO
Copy link
Contributor

@JonathanO JonathanO commented Feb 5, 2024

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:

  • Run 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.

…singleton array.

Signed-off-by: Jonathan Oddy <jonathan@woaf.net>
@haarchri
Copy link
Member

haarchri commented Feb 6, 2024

@ulucinar can you do a review ?

Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JonathanO, lgtm.

@ulucinar ulucinar merged commit a377f81 into crossplane-contrib:main Feb 7, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants