-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Bump DefaultKubeBinaryVersion to 1.33 #128279
Conversation
fa38c5f
to
bb10eaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated PTAL
@@ -118,7 +118,7 @@ func TestVersionFlagOptions(t *testing.T) { | |||
func TestVersionFlagOptionsWithMapping(t *testing.T) { | |||
r := testRegistry(t) | |||
utilruntime.Must(r.SetEmulationVersionMapping(testComponent, DefaultKubeComponent, | |||
func(from *version.Version) *version.Version { return from.OffsetMinor(3) })) | |||
func(from *version.Version) *version.Version { return version.MajorMinor(1, from.Minor()+23) })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was updated because the original test was not written to check the actual values of the mapping, just a placeholder for a mapping exist. So it is actually mapping test 2.8 to kube 2.11, which is not aligned with the kube binary at all.
This change fixes the test to the correct version mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is adding 23 to the minor correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mapping is from test component 2.7 -> kube 1.30 and 2.8 -> kube 1.31 which is where the +23 was derived from specifically for this test.
This seems a bit worrisome but I was also able to reproduce this on master. Created #129352 /test pull-kubernetes-unit |
/lgtm |
LGTM label has been added. Git tree hash: 6d8358d261407306af388a95732946346359e891
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jefftree, liggitt 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:
Approvers can indicate their approval by writing |
// Only test for beta and GA APIs with emulated version. | ||
featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, feature.DefaultFeatureGate, version.MustParse(v)) | ||
featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, "AllBeta", true) | ||
registerEffectiveEmulationVersion(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This presents a problem , and it took me several days to find it but I still can't figure out how to solve it.
If you checkout my PR #128971 and apply the following patch
diff --git a/pkg/controlplane/apiserver/apis.go b/pkg/controlplane/apiserver/apis.go
index 7ed3a58489b..47dc2cf2467 100644
--- a/pkg/controlplane/apiserver/apis.go
+++ b/pkg/controlplane/apiserver/apis.go
@@ -89,6 +89,7 @@ func (s *Server) InstallAPIs(restStorageProviders ...RESTStorageProvider) error
nonLegacy := []*genericapiserver.APIGroupInfo{}
// used later in the loop to filter the served resource by those that have expired.
+ klog.Infof("DEBUG ---------- effective emulation version %s", s.GenericAPIServer.EffectiveVersion.EmulationVersion().String())
resourceExpirationEvaluator, err := genericapiserver.NewResourceExpirationEvaluator(s.GenericAPIServer.EffectiveVersion.EmulationVersion())
if err != nil {
return err
and runs the test
go test -timeout 600s -run ^TestEtcdStoragePath$ k8s.io/kubernetes/test/integration/etcd -v -count 1 | grep -E 'DEBUG|TestEtcdStoragePath'
you can see that the 1.33 fails because it it keeps using the emulated version 1.32 with 1.33 , this causes the APIExpiration thingy to disable the v1 version of the apiserver for servicecidrs and ipaddresses, and the cluster can not start
=== RUN TestEtcdStoragePath/1.33
I0109 00:21:01.588321 2218629 serving.go:380] Generated self-signed cert (/tmp/TestEtcdStoragePath1.3382862738/apiserver.crt, /tmp/TestEtcdStoragePath1.3382862738/apiserver.key)
I0109 00:21:01.590392 2218629 dynamic_serving_content.go:116] "Loaded a new cert/key pair" name="serving-cert::/tmp/TestEtcdStoragePath1.3382862738/apiserver.crt::/tmp/TestEtcdStoragePath1.3382862738/apiserver.key"
I0109 00:21:01.989808 2218629 apf_controller.go:292] NewTestableController "Controller" with serverConcurrencyLimit=600, name=Controller, asFieldManager="api-priority-and-fairness-config-consumer-v1"
I0109 00:21:02.018277 2218629 apis.go:92] DEBUG ---------- effective emulation version 1.32
however, if you run the test individually it works fine
PASS
{"level":"warn","ts":"2025-01-09T00:24:46.595770Z","caller":"embed/serve.go:160","msg":"stopping insecure grpc server due to error","error":"accept tcp 127.0.0.1:42889: use of closed network connection"}
{"level":"warn","ts":"2025-01-09T00:24:46.595848Z","caller":"embed/serve.go:162","msg":"stopped insecure grpc server due to error","error":"accept tcp 127.0.0.1:42889: use of closed network connection"}
I0109 00:24:51.596565 2223139 etcd.go:158] etcd didn't exit in 5 seconds, killing it
I0109 00:24:51.596601 2223139 etcd.go:164] etcd exit status: signal: terminated
ok k8s.io/kubernetes/test/integration/etcd 19.938s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming this is an issue. The variable is actually reset properly but we need to call https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/testing/testserver.go#L208-L209 to register the proper effective version with the component. Will send a fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the frustration. #129416 should be able to fix the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the frustration. #129416 should be able to fix the problem.
not sorry about nothing, these things happen, we need to break some eggs to do the omelette :)
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Bump DefaultKubeBinaryVersion to 1.33
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/triage accepted