-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
k8s: Bump k8s libraries to v0.30.0 #11840
base: main
Are you sure you want to change the base?
Conversation
13af120
to
b4a4ae9
Compare
pkg/virt-api/api.go
Outdated
@@ -780,7 +780,7 @@ func (app *virtAPIApp) Compose() { | |||
} | |||
|
|||
func (app *virtAPIApp) ConfigureOpenAPIService() { | |||
config := openapi.CreateConfig() | |||
config := openapi.CreateV3Config() |
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.
Why is this needed?
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.
At the time it looks like it was necessary but on second look I think it can be removed. DONE
@@ -39,7 +39,7 @@ func DefaultLeaderElectionConfiguration() Configuration { | |||
LeaseDuration: metav1.Duration{Duration: DefaultLeaseDuration}, | |||
RenewDeadline: metav1.Duration{Duration: DefaultRenewDeadline}, | |||
RetryPeriod: metav1.Duration{Duration: DefaultRetryPeriod}, | |||
ResourceLock: resourcelock.EndpointsLeasesResourceLock, | |||
ResourceLock: resourcelock.LeasesResourceLock, |
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.
Why?
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.
See here. Looks like that EndpointsLeasesResourceLock
is deprecated.
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.
But for some reason the virt-controller
endpoint is gone... trying to figure out why
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.
Well evidently this change made it so that the leader info is kept on the lease.
Fixed accordingly.
Added a comment on the commit desc.
@@ -1,6 +1,8 @@ | |||
module kubevirt.io/client-go | |||
|
|||
go 1.21 | |||
go 1.22.0 |
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.
Why?
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.
I think I saw a runtime log saying that it needed it.. will try to remove it back and see if I get it again.
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.
go: module ./staging/src/kubevirt.io/client-go requires go >= 1.22.0; switching to go1.22.2
Added a comment on the commit desc.
"description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", | ||
"name": "fieldSelector", | ||
"in": "query" | ||
"$ref": "#/parameters/fieldSelector-xIcQKXFG" |
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.
swagger seems wrong
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.
hmm, sure looks odd. I counted about 19 of these. make apidoc
passes. still checking..
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.
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.
If IDE parse it then it sounds good
I am not familiar with it, better to ask someone who does
thanks
b4a4ae9
to
00b0bf3
Compare
8de6611
to
f97cee5
Compare
/retest-required |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jean-edouard 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 |
Required labels detected, running phase 2 presubmits: |
/test pull-kubevirt-unit-test |
/retest-required |
1 similar comment
/retest-required |
This will make it more convenient to import A question out of curiosity: Is it ok to make kubevirt depend on k8s 1.30, when CI still runs on 1.28 and 1.29? I assumed that we support these older versions. Is the k8s.io code backward compatible? |
@RamLavi - there looks to be an issue with the sig-monitoring lane on this PR. https://prow.ci.kubevirt.io/pr-history/?org=kubevirt&repo=kubevirt&pr=11840 |
/retest-required |
Lemme take a look |
This can fix it: #11950 |
I don't think it's a problem, as long as we make sure to use GAed features and resources, then k8s should be backwards compatible. |
some cosmetics nits here that can be done for leader election change (your change is right, just some var name changes if you want to take a look please) |
Following manual [0] updating k8s vendor on all relevant go.mod files. Additional to the normal vendor bumping, the following changes were made to the code: - go.mod's go version changed to go 1.22.0 (automatically by deps-update) - Changed PersistentVolumeClaimSpec's Resources field to be of type VolumeResourceRequirements [1]. - DefaultLeaderElectionConfigurations ResourceLock in leader election config was changed to LeasesResourceLock [2]. Accordingly, the leader pod is now taken from the lease object. - Currently builderv3 is used to create the spec for routes. Since the spec is different now - moving to use v1. - Move from deprecated PollImmediate. [0] https://github.com/kubevirt/kubevirt/blob/main/docs/update-k8s-dependencies.md [1] https://www.pulumi.com/registry/packages/kubernetes/api-docs/core/v1/persistentvolumeclaim/#resources_nodejs [2] https://github.com/kubevirt/kubevirt/blob/76bf9b2675954499165bc35ba12c8f9c9f45bc01/pkg/virt-controller/leaderelectionconfig/config.go#L37 Signed-off-by: Ram Lavi <ralavi@redhat.com>
ca842bf
to
342c201
Compare
Change: Rebase |
/lgtm |
Required labels detected, running phase 2 presubmits: |
if the failures are not related please consider unhold |
Looking at the PR history here - it looks like this will be very unlikely to merge until #11950 is merged. https://prow.ci.kubevirt.io/pr-history/?org=kubevirt&repo=kubevirt&pr=11840 The hold should probably stay in place until #11950 is merged or we decide to override the monitoring lane here? |
but if you override, wont this flake affect everything once this PR is merged? |
/hold |
@RamLavi: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
What this PR does
This PR bumps k8s vendor to v0.30.0 on go.mod files.
It also performs needed changes in order to comply with the new vendor libraries.
Note: This PR follows the update-k8s-dependencies. manual.
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note