Skip to content

feat: Add openapi/v2 endpoint #333

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akrejcir
Copy link
Collaborator

@akrejcir akrejcir commented Apr 23, 2025

What this PR does / why we need it:
Added openapi/v2 endpoint that is accessed by the kubernetes API aggregator.

Which issue(s) this PR fixes:
Fixes: https://issues.redhat.com/browse/CNV-59744

Release note:

None

Copy link

openshift-ci bot commented Apr 23, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XXL labels Apr 23, 2025
@kubevirt-bot kubevirt-bot requested review from 0xFelix and ksimon1 April 23, 2025 14:07
@akrejcir
Copy link
Collaborator Author

/test all

@kubevirt-bot
Copy link
Contributor

@akrejcir: No presubmit jobs available for kubevirt/vm-console-proxy@main

In response to this:

/test all

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.

@akrejcir
Copy link
Collaborator Author

/retest

@akrejcir akrejcir marked this pull request as ready for review April 23, 2025 14:53
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 23, 2025
@akrejcir
Copy link
Collaborator Author

Holding until I verify that this fixes the bug.

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 23, 2025
@akrejcir akrejcir marked this pull request as draft April 24, 2025 09:20
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 24, 2025
@akrejcir akrejcir force-pushed the add-openapi-endpoint branch from 152ecc1 to 6c42d7a Compare April 24, 2025 13:32
@akrejcir
Copy link
Collaborator Author

/unhold

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 24, 2025
@akrejcir akrejcir marked this pull request as ready for review April 24, 2025 13:33
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 24, 2025
@akrejcir
Copy link
Collaborator Author

/cc @0xFelix @jcanocan

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

/approve

From what I can tell it looks good

@@ -12,6 +12,7 @@ require (
k8s.io/api v0.31.0
k8s.io/apimachinery v0.32.3
k8s.io/client-go v0.31.0
k8s.io/kube-openapi v0.31.0
Copy link
Member

Choose a reason for hiding this comment

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

side note: How is there v0.31.0 of this dependency but no version for openapi-gen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no tagged version of k8s.io/kube-openapi, the repo has no tags: https://github.com/kubernetes/kube-openapi

This v0.31.0, is an invalid version, that has been propagated from kubevirt client-go: https://github.com/kubevirt/client-go/blob/v1.5.0/go.mod#L25

Then later in this go.mod we set it to a commit version:

replace (
	// This is needed by kubevirt.io/client-go
	k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f
)

We should sometime fix the dependencies of kubevirt/client-go.

Copy link
Collaborator Author

@akrejcir akrejcir Apr 24, 2025

Choose a reason for hiding this comment

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

kube-openapi has an issue for tagged releases, that no one is working on in a long time:
https://github.com/kubernetes/kube-openapi/issues/383

Copy link
Member

Choose a reason for hiding this comment

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

We should sometime fix the dependencies of kubevirt/client-go

kubevirt/kubevirt#14399 FWIW I started but didn't finish this.

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2025
This endpoint is accessed by the kubernetes API aggregator.

Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
@akrejcir akrejcir force-pushed the add-openapi-endpoint branch from 6c42d7a to ae47d22 Compare April 25, 2025 09:54
@jcanocan
Copy link

Thanks @akrejcir!
Looks good to me!

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. release-note-none Denotes a PR that doesn't merit a release note. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants