chore: refactor read scheme to openapi from kubernetes api definition#6190
Open
koba1t wants to merge 1 commit into
Open
chore: refactor read scheme to openapi from kubernetes api definition#6190koba1t wants to merge 1 commit into
koba1t wants to merge 1 commit into
Conversation
Contributor
|
Skipping CI for Draft Pull Request. |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: koba1t The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
koba1t
force-pushed
the
agent/openapi-artifact-compiler
branch
from
July 17, 2026 08:35
7d9bba2 to
692fd5d
Compare
Previously, only a single embedded Kubernetes API version could be specified, resulting in a lack of support for certain GVKs. To address this, the goal is to create and utilize a unified scheme that consolidates Kubernetes API definitions. As a preliminary step, the current method of loading API definitions will be improved.
koba1t
force-pushed
the
agent/openapi-artifact-compiler
branch
from
July 17, 2026 08:39
692fd5d to
f07ebf5
Compare
koba1t
marked this pull request as ready for review
July 17, 2026 08:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #5016.
What this PR does
go:embedand loads the built-in schema from it at runtime.go-bindataandkindfrom the built-in schema generation workflow.This is the artifact-compiler migration only. The generated bundle still represents Kubernetes v1.21.2; combining API definitions from multiple Kubernetes releases will be handled separately.
Why
The existing generated Go assets embed and decode a single Kubernetes OpenAPI protobuf at runtime. Moving that conversion to a deterministic build-time compiler creates a versioned artifact boundary for a future union of Kubernetes API definitions while avoiding additional runtime data and dependencies.
In a local comparison, the resulting kustomize binary was 201,408 bytes smaller (17,396,722 bytes to 17,195,314 bytes).
Special notes for reviewers
The
.bundle-v1.json.gzandswagger.pb.gzfiles are generated artifacts. Their generation and verification commands are documented inkyaml/openapi/README.md.AI disclosure: This PR was written in part with the assistance of generative AI.