Skip to content

Conversation

@wtripp180901
Copy link
Contributor

Fixes a race where after upgrades, clusters services added to existing clusters don't get added to Platform CRs and are therefore don't have zenith endpoints created for them.
Removes on_cluster_services_update handler in favour of updating platform CRs within the same thread the cluster's status.services field is updated to avoid races presumably caused by divergent views of the cluster between easykube objects used to patch services into the cluster status and instance objects recorded by kopf handlers

@wtripp180901 wtripp180901 requested a review from a team as a code owner August 20, 2025 15:18
wtripp180901 and others added 3 commits August 20, 2025 16:30
namespace=namespace,
)
instance.status.services = cluster_services
await save_cluster_status(instance)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we can test keeping the above json patch, and only using the update_platforms_for_cluster below?

I am worried here we are going to be hitting issues where the instance object is out of sync, so we error out and then have to retry.

)
instance.status.services = cluster_services
await save_cluster_status(instance)
await update_platforms_for_cluster(instance)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we try keeping just this line in here? I think we only need the instance here to create the owner reference.

@JohnGarbutt JohnGarbutt marked this pull request as draft November 10, 2025 12:44
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