chore: refactor read scheme to openapi from kubernetes api definition

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.
This commit is contained in:
koba1t
2026-07-17 17:16:44 +09:00
committed by Yugo Kobayashi
parent f7d33c2610
commit 9216c6f573
29 changed files with 1791 additions and 45006 deletions

View File

@@ -1,18 +1,22 @@
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Code generated by ./scripts/makeOpenApiInfoDotGo.sh; DO NOT EDIT.
// Package kubernetesapi preserves access to the legacy built-in Kubernetes
// OpenAPI assets. New code should use the parent openapi package.
package kubernetesapi
import (
"sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2"
)
// Info describes the Kubernetes release represented by the legacy asset map.
const Info = "{title:Kubernetes,version:v1.21.2}"
var OpenAPIMustAsset = map[string]func(string) []byte{
// OpenAPIMustAsset maps supported Kubernetes releases to their legacy asset
// loaders.
var OpenAPIMustAsset = map[string]func(string) []byte{ //nolint:gochecknoglobals // Retained for API compatibility.
"v1.21.2": v1_21_2.MustAsset,
}
// DefaultOpenAPI is the default release exposed by the legacy asset map.
const DefaultOpenAPI = "v1.21.2"