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

Multi-stage cluster addons: Upgrade from faulty cluster stack to one with the same Kubernetes version does not work #212

Open
janiskemper opened this issue Jun 17, 2024 · 0 comments
Labels
Container Issues or pull requests relevant for Team 2: Container Infra and Tooling

Comments

@janiskemper
Copy link
Member

What steps did you take and what happened:
Create a cluster stack, e.g. with a wrong CEL expression, so that it will never apply the clusteraddons successfully. Then upgrade to another cluster stack that has no issue. In this case, the AfterControlPlaneInitialized hook will stay in the clusteraddon object and the controller will continue to apply based on AfterControlPlaneInitialized, not BeforeClusterUpgrade.

What did you expect to happen:
The controller should realize that the cluster got upgraded and that it has to remove the existing status and also the spec.hook property.

Currrently, this is not possible, as we cannot know the previous cluster stack if it didn't complete successfully. However, we can solve this by writing the cluster stack that should be upgraded to into the annotations. From there we can read it and if it is set and there is a mismatch between the annotation and the current cluster stack we upgrade to (cluster.spec.topology.class), we know that something went wrong previously and that we should remove the status as well as the spec.hook of clusteraddon.

@janiskemper janiskemper added the Container Issues or pull requests relevant for Team 2: Container Infra and Tooling label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Container Issues or pull requests relevant for Team 2: Container Infra and Tooling
Projects
Status: Backlog
Development

No branches or pull requests

1 participant