-
Notifications
You must be signed in to change notification settings - Fork 389
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
Fix identification of control-plane Node in e2e test framework #3728
Fix identification of control-plane Node in e2e test framework #3728
Conversation
We use the `node-role.kubernetes.io/<ROLE>` label to identify the control-plane Node. The `<ROLE>` we use needs to depend on the K8s version because: - before K8s v1.20, the label is `node-role.kubernetes.io/master` - starting with K8s v1.24, the label is `node-role.kubernetes.io/control-plane`. - in between, both labels are used by K8s However, the function used to determine the correct label to use based on the K8s version was called *before* the K8s server version was actually determined, so it was always returning `node-role.kubernetes.io/master`. This was causing tests to fail for K8s v1.24 (which has just been released), since the label no longer exists in that version. Signed-off-by: Antonin Bas <abas@vmware.com>
Codecov Report
@@ Coverage Diff @@
## main #3728 +/- ##
==========================================
- Coverage 64.44% 56.63% -7.81%
==========================================
Files 278 392 +114
Lines 39513 55091 +15578
==========================================
+ Hits 25463 31201 +5738
- Misses 12068 21459 +9391
- Partials 1982 2431 +449
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-e2e |
/test-e2e |
/test-ipv6-e2e |
@antoninbas do you think this PR and #3731 should be backported to make antrea 1.5 and 1.6 work with K8s 1.24 better? |
Yes we can backport. I'll open the PRs for this one. #3731 is more important since it affects controller scheduling. |
We use the
node-role.kubernetes.io/<ROLE>
label to identify thecontrol-plane Node. The
<ROLE>
we use needs to depend on the K8sversion because:
node-role.kubernetes.io/master
node-role.kubernetes.io/control-plane
.However, the function used to determine the correct label to use based
on the K8s version was called before the K8s server version was
actually determined, so it was always returning
node-role.kubernetes.io/master
. This was causing tests to fail for K8sv1.24 (which has just been released), since the label no longer exists
in that version.
Signed-off-by: Antonin Bas abas@vmware.com