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

✨ KCP: default ControlPlaneKubeletLocalMode feature gate to true for >= 1.31.0 #10947

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer buringerst@vmware.com

What this PR does / why we need it:
This is now the proper fix to the issue discovered and mitigated (in e2e tests) in #10940

The underlying issue is the following

  • Since we bumped our tests to Kubernetes 1.31 the "When testing Cluster API working on self-hosted clusters using ClusterClass with a HA control plane" test has been failing pretty frequently
  • The root cause is that in some case a 1.31 kubelet tries to list services from a 1.30 apiserver
  • This fails because the 1.30 apiserver does not support field selectors for spec.clusterIP: Field selector for Services based on ClusterIP and Type kubernetes/kubernetes#123905
  • The problem is that kubeadm join configures the kubelet to use the apiserver loadbalancer instead of the local apiserver.
    With the feature gate enabled kubeadm should use the local apiserver endpoint instead

This PR now:

  • enables the ControlPlaneKubeletLocalMode kubeadm feature gate per default for v1.31 Machines, if not otherwise specified by the user via the KCP object, by:
    • Defaulting the feature gate for the KubeadmConfigs we generate in KCP
    • Updating the kubeadm-config ConfigMap in workload clusters with defaulted feature gates (also via KCP)
  • reverts the e2e test mitigation from 🌱 Enable kubeadm ControlPlaneKubeletLocalMode feature gate in e2e tests #10940

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Jul 26, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 26, 2024
@sbueringer
Copy link
Member Author

sbueringer commented Jul 26, 2024

/hold
still adding a few unit tests (and fixing the linter)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 26, 2024
@sbueringer sbueringer added the area/provider/control-plane-kubeadm Issues or PRs related to KCP label Jul 26, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Jul 26, 2024
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-mink8s-main

@sbueringer
Copy link
Member Author

… 1.31.0

Signed-off-by: Stefan Büringer buringerst@vmware.com
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 26, 2024
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main
/test pull-cluster-api-e2e-mink8s-main

e2e-main was green, e2e-main-mink8s timed out, but I think the cause of that is unrelated

@fabriziopandini
Copy link
Member

/lgtm
/approve

/hold for @chrischdi to take a look

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 26, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1018a7603fdde2240808f5735ca4779f42a6fa8a

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2024
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

/approve

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 26, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi, fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [chrischdi,fabriziopandini]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chrischdi
Copy link
Member

/retest

MachinePool flake

@k8s-ci-robot k8s-ci-robot merged commit 9c08773 into kubernetes-sigs:main Jul 26, 2024
23 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.8 milestone Jul 26, 2024
@sbueringer sbueringer deleted the pr-fix-kubeadm branch July 26, 2024 15:02
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm
thanks @sbueringer for adding the CAPI integration!

@neolit123
Copy link
Member

neolit123 commented Jul 31, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/control-plane-kubeadm Issues or PRs related to KCP cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants