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 Cluster's nodeConfig to avoid fights over ownership. #487

Merged

Conversation

JonathanO
Copy link
Contributor

@JonathanO JonathanO commented Mar 15, 2024

Description of your changes

The Cluster 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:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Running in kind against GKE

…hts over ownership.

Signed-off-by: Jonathan Oddy <jonathan@woaf.net>
@JonathanO JonathanO force-pushed the jono-fix-cluster-nodeconfig-merge branch from 593b8d7 to 8eba414 Compare March 15, 2024 13:47
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. Checked the Terraform schema of node_config and I agree with your analysis that there's no natural indexing set for the type and hence, we need to inject a new index key to the type. As a side note, could you please consider using signed commits in the future?

@sergenyalcin, @turkenf, let's aim to release these changes in v1.0.2.

@ulucinar ulucinar merged commit e5fb77b into crossplane-contrib:main Mar 21, 2024
9 checks passed
Copy link

Successfully created backport PR #494 for release-0.41.

Copy link

Successfully created backport PR #495 for release-1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants