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

constellation-node-operator: upgrade control plane nodes first #3663

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

msanft
Copy link
Contributor

@msanft msanft commented Feb 24, 2025

Context

Since Kubernetes v1.31, the requirement that Kubeletes of version n are incompatible with outdated (version n-1) Kube-API servers / control planes is actually enforced / errors if not fulfilled. Thus, we need to make sure during the upgrade that this case doesn't occur in a Constellation cluster.

Proposed change(s)

  • Sort the nodes in the upgrade process of the operator, such that control plane nodes get upgraded first.
  • Also, workers now wait during the upgrade if there are still outdated control plane nodes.

Additional info

  • AB#5311
  • GCP 2:8 Upgrade Test. The high worker count ensures that the probability for a worker node being upgraded before a control plane node is reasonably high.

Checklist

  • Run the E2E tests that are relevant to this PR's changes
  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

@msanft msanft added the no changelog Change won't be listed in release changelog label Feb 24, 2025
@msanft msanft added this to the v2.21.0 milestone Feb 24, 2025
@msanft msanft force-pushed the msanft/operator/cp-nodes-first branch 3 times, most recently from 30e0be3 to 3091c75 Compare February 24, 2025 11:17
@msanft msanft marked this pull request as ready for review February 24, 2025 11:17
@msanft msanft requested a review from 3u13r as a code owner February 24, 2025 11:17
@msanft msanft force-pushed the msanft/operator/cp-nodes-first branch from 3091c75 to ab7e8c3 Compare February 24, 2025 11:20
Copy link
Member

@daniel-weisse daniel-weisse left a comment

Choose a reason for hiding this comment

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

looks good to me if tests pass

@msanft
Copy link
Contributor Author

msanft commented Feb 24, 2025

Manual 1:4 test on GCP succeeded too

@msanft msanft force-pushed the msanft/operator/cp-nodes-first branch 2 times, most recently from 284adc3 to 00fc840 Compare February 25, 2025 08:41
@msanft msanft force-pushed the msanft/operator/cp-nodes-first branch from 00fc840 to f01527a Compare February 26, 2025 09:57
@msanft
Copy link
Contributor Author

msanft commented Feb 26, 2025

New E2E Test

Copy link
Contributor

Coverage report

Package Old New Trend
bootstrapper/internal/kubernetes/k8sapi 13.10% 14.00% ↗️
internal/constellation/kubecmd 62.40% 75.50% ↗️
internal/versions 9.70% 9.70% 🚧
operators/constellation-node-operator/controllers 30.80% 31.40% ↗️

@msanft msanft merged commit ed33e5d into burgerdev/k8s-1.31 Feb 26, 2025
11 checks passed
@msanft msanft deleted the msanft/operator/cp-nodes-first branch February 26, 2025 11:57
burgerdev added a commit that referenced this pull request Feb 26, 2025
* constellation-node-operator: upgrade control plane nodes first (#3663)

* versions: add k8s 1.31, remove k8s 1.28

* e2e: set default k8s version for daily to 1.30

* e2e: remove defaults for required arguments

* versions: move 1.31 to the end of the list

* kubernetes: set feature gate ControlPlaneKubeletLocalMode

Co-Authored-By: Leonard Cohnen <[email protected]>
Co-authored-by: Moritz Sanft <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants