-
Notifications
You must be signed in to change notification settings - Fork 1.6k
🌱 test: drop handling for old k8s version #2925
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
🌱 test: drop handling for old k8s version #2925
Conversation
Hi @Eileen-Yu. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
test/e2e/v3/plugin_cluster_test.go
Outdated
It("should generate a runnable project with v1beta1 CRDs and Webhooks with restricted pods", func() { | ||
// Skip if cluster version < 1.15, when `.spec.preserveUnknownFields` was not a v1beta1 CRD field. | ||
// Skip if cluster version < 1.19, because securityContext.seccompProfile only works from 1.19 | ||
// Otherwise, unknown field "seccompProfile" in io.k8s.api.core.v1.PodSecurityContext will be faced | ||
// Skip if cluster version >= 1.22 because pre v1 CRDs and webhooks no longer exist. | ||
if srvVer := kbc.K8sVersion.ServerVersion; srvVer.GetMajorInt() <= 1 && srvVer.GetMinorInt() < 19 || | ||
srvVer.GetMajorInt() <= 1 && srvVer.GetMinorInt() >= 22 { | ||
Skip(fmt.Sprintf("cluster version %s does not support project defaults "+ | ||
"and securityContext.seccompProfile", srvVer.GitVersion)) | ||
} | ||
|
||
kbc.IsRestricted = true | ||
GenerateV3(kbc, "v1beta1") | ||
// GenerateV3(kbc, "v1beta1") | ||
Run(kbc) | ||
}) |
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.
We can remove the whole one since it is to do the same done above but with the CRD/Webhooks using the API v1beta1 which is no longer provided since k8s 1.22
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.
Just removed the whole it(...)
test case if I'm understanding correctly.
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.
Yes, we can have the whole it(...)
159098d
to
23b5c86
Compare
23b5c86
to
a9e6b79
Compare
test/e2e/v3/plugin_cluster_test.go
Outdated
srvVer.GitVersion)) | ||
} | ||
|
||
GenerateV3ComponentConfig(kbc, "v1") |
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.
That is great. Just a nit.
See that we no longer need to pass v1 or v1beta1
So, we can clean up the calls as well removing this option as the related code.
Example:
kubebuilder/test/e2e/v3/generate_test.go
Line 133 in ed5d217
func GenerateV3(kbc *utils.TestContext, crdAndWebhookVersion string) { |
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.
/ok-to-test
a9e6b79
to
0d0def5
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.
That is great work 🥇
/approved |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, Eileen-Yu 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 |
Description:
This PR aims to drop handling of old k8s version in e2e test cases.
Motivation
This aims to resolve #2921