Merge pull request #111978 from Jefftree/aggregated-discovery-types

Aggregated discovery types
This commit is contained in:
Kubernetes Prow Robot 2022-10-19 13:57:07 -07:00 committed by GitHub
commit a2827c4915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 3658 additions and 0 deletions

View File

@ -121,6 +121,7 @@ internal.apiserver.k8s.io/v1alpha1 \
KUBE_NONSERVER_GROUP_VERSIONS="
abac.authorization.kubernetes.io/v0 \
abac.authorization.kubernetes.io/v1beta1 \
apidiscovery.k8s.io/v2beta1 \
componentconfig/v1alpha1 \
imagepolicy.k8s.io/v1alpha1\
admission.k8s.io/v1\

View File

@ -92,6 +92,7 @@ done
packages_without_install=(
"k8s.io/kubernetes/pkg/apis/abac"
"k8s.io/kubernetes/pkg/apis/admission"
"k8s.io/kubernetes/pkg/apis/apidiscovery"
"k8s.io/kubernetes/pkg/apis/componentconfig" # TODO: Remove this package completely and from this list
)
known_version_files=(

View File

@ -0,0 +1,21 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +groupName=apidiscovery.k8s.io
// Package apidiscovery provides api definitions for the "apidiscovery.k8s.io" api group.
package apidiscovery // import "k8s.io/kubernetes/pkg/apis/apidiscovery"

View File

@ -0,0 +1,54 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apidiscovery
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName is the name of api group
const GroupName = "apidiscovery.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
// Kind takes an unqualified kind and returns a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
return SchemeGroupVersion.WithKind(kind).GroupKind()
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
// SchemeBuilder installs the api group to a scheme
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
// AddToScheme adds api to a scheme
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&APIGroupDiscoveryList{},
&APIGroupDiscovery{},
)
return nil
}

View File

@ -0,0 +1,156 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apidiscovery
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
// that a cluster supports.
type APIGroupDiscoveryList struct {
v1.TypeMeta
// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
v1.ListMeta
// items is the list of groups for discovery. The groups are listed in priority order.
Items []APIGroupDiscovery
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// APIGroupDiscovery holds information about which resources are being served for all version of the API Group.
// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
// Versions are in descending order of preference, with the first version being the preferred entry.
type APIGroupDiscovery struct {
v1.TypeMeta
// Standard object's metadata.
// The only field completed will be name. For instance, resourceVersion will be empty.
// name is the name of the API group whose discovery information is presented here.
// name is allowed to be "" to represent the legacy, ungroupified resources.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
v1.ObjectMeta
// versions are the versions supported in this group. They are sorted in descending order of preference,
// with the preferred version being the first entry.
// +listType=map
// +listMapKey=version
Versions []APIVersionDiscovery
}
// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
type APIVersionDiscovery struct {
// version is the name of the version within a group version.
Version string
// resources is a list of APIResourceDiscovery objects for the corresponding group version.
// +listType=map
// +listMapKey=resource
Resources []APIResourceDiscovery
// freshness marks whether a group version's discovery document is up to date.
// "Current" indicates the discovery document was recently
// refreshed. "Stale" indicates the discovery document could not
// be retrieved and the returned discovery document may be
// significantly out of date. Clients that require the latest
// version of the discovery information be retrieved before
// performing an operation should not use the aggregated document
// and instead retrieve the necessary version docs directly.
Freshness DiscoveryFreshness
}
// APIResourceDiscovery provides information about an API resource for discovery.
type APIResourceDiscovery struct {
// resource is the plural name of the resource. This is used in the URL path and is the unique identifier
// for this resource across all versions in the API group.
// Resources with non-empty groups are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
// Resources with empty groups are located at /api/v1/<APIResourceDiscovery.Resource>
Resource string
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
// APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior.
// This value will be null if an APIService reports subresources but supports no operations on the parent resource
ResponseKind *v1.GroupVersionKind
// scope indicates the scope of a resource, either Cluster or Namespaced
Scope ResourceScope
// singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely.
// For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence.
// The command line tool kubectl, for example, allows use of the singular resource name in place of plurals.
// The singular form of a resource should always be an optional element - when in doubt use the canonical resource name.
SingularResource string
// verbs is a list of supported API operation types (this includes
// but is not limited to get, list, watch, create, update, patch,
// delete, deletecollection, and proxy).
// +listType=set
Verbs []string
// shortNames is a list of suggested short names of the resource.
// +listType=set
ShortNames []string
// categories is a list of the grouped resources this resource belongs to (e.g. 'all').
// Clients may use this to simplify acting on multiple resource types at once.
// +listType=set
Categories []string
// subresources is a list of subresources provided by this resource. Subresources are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>/name-of-instance/<APIResourceDiscovery.subresources[i].subresource>
// +listType=map
// +listMapKey=subresource
Subresources []APISubresourceDiscovery
}
// ResourceScope is an enum defining the different scopes available to a resource.
type ResourceScope string
const (
ScopeCluster ResourceScope = "Cluster"
ScopeNamespace ResourceScope = "Namespaced"
)
// DiscoveryFreshness is an enum defining whether the Discovery document published by an apiservice is up to date (fresh).
type DiscoveryFreshness string
const (
DiscoveryFreshnessCurrent DiscoveryFreshness = "Current"
DiscoveryFreshnessStale DiscoveryFreshness = "Stale"
)
// APISubresourceDiscovery provides information about an API subresource for discovery.
type APISubresourceDiscovery struct {
// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
// for this resource across all versions.
Subresource string
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
// Some subresources do not return normal resources, these will have null return types.
ResponseKind *v1.GroupVersionKind
// acceptedTypes describes the kinds that this endpoint accepts.
// Subresources may accept the standard content types or define
// custom negotiation schemes. The list may not be exhaustive for
// all operations.
// +listType=map
// +listMapKey=group
// +listMapKey=version
// +listMapKey=kind
AcceptedTypes []v1.GroupVersionKind
// verbs is a list of supported API operation types (this includes
// but is not limited to get, list, watch, create, update, patch,
// delete, deletecollection, and proxy). Subresources may define
// custom verbs outside the standard Kubernetes verb set. Clients
// should expect the behavior of standard verbs to align with
// Kubernetes interaction conventions.
// +listType=set
Verbs []string
}

View File

@ -0,0 +1,24 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apidiscovery
// +k8s:conversion-gen-external-types=k8s.io/api/apidiscovery/v2beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=k8s.io/api/apidiscovery/v2beta1
// +groupName=apidiscovery.k8s.io
package v2beta1 // import "k8s.io/kubernetes/pkg/apis/apidiscovery/v2beta1"

View File

@ -0,0 +1,39 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta1
import (
apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName is the group name use in this package
const GroupName = "apidiscovery.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
localSchemeBuilder = &apidiscoveryv2beta1.SchemeBuilder
// AddToScheme adds api to a scheme
AddToScheme = localSchemeBuilder.AddToScheme
)

View File

@ -0,0 +1,220 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by conversion-gen. DO NOT EDIT.
package v2beta1
import (
unsafe "unsafe"
v2beta1 "k8s.io/api/apidiscovery/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
apidiscovery "k8s.io/kubernetes/pkg/apis/apidiscovery"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v2beta1.APIGroupDiscovery)(nil), (*apidiscovery.APIGroupDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(a.(*v2beta1.APIGroupDiscovery), b.(*apidiscovery.APIGroupDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIGroupDiscovery)(nil), (*v2beta1.APIGroupDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(a.(*apidiscovery.APIGroupDiscovery), b.(*v2beta1.APIGroupDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v2beta1.APIGroupDiscoveryList)(nil), (*apidiscovery.APIGroupDiscoveryList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(a.(*v2beta1.APIGroupDiscoveryList), b.(*apidiscovery.APIGroupDiscoveryList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIGroupDiscoveryList)(nil), (*v2beta1.APIGroupDiscoveryList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(a.(*apidiscovery.APIGroupDiscoveryList), b.(*v2beta1.APIGroupDiscoveryList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v2beta1.APIResourceDiscovery)(nil), (*apidiscovery.APIResourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(a.(*v2beta1.APIResourceDiscovery), b.(*apidiscovery.APIResourceDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIResourceDiscovery)(nil), (*v2beta1.APIResourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(a.(*apidiscovery.APIResourceDiscovery), b.(*v2beta1.APIResourceDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v2beta1.APISubresourceDiscovery)(nil), (*apidiscovery.APISubresourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(a.(*v2beta1.APISubresourceDiscovery), b.(*apidiscovery.APISubresourceDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*apidiscovery.APISubresourceDiscovery)(nil), (*v2beta1.APISubresourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(a.(*apidiscovery.APISubresourceDiscovery), b.(*v2beta1.APISubresourceDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v2beta1.APIVersionDiscovery)(nil), (*apidiscovery.APIVersionDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(a.(*v2beta1.APIVersionDiscovery), b.(*apidiscovery.APIVersionDiscovery), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIVersionDiscovery)(nil), (*v2beta1.APIVersionDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(a.(*apidiscovery.APIVersionDiscovery), b.(*v2beta1.APIVersionDiscovery), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(in *v2beta1.APIGroupDiscovery, out *apidiscovery.APIGroupDiscovery, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.Versions = *(*[]apidiscovery.APIVersionDiscovery)(unsafe.Pointer(&in.Versions))
return nil
}
// Convert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery is an autogenerated conversion function.
func Convert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(in *v2beta1.APIGroupDiscovery, out *apidiscovery.APIGroupDiscovery, s conversion.Scope) error {
return autoConvert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(in, out, s)
}
func autoConvert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(in *apidiscovery.APIGroupDiscovery, out *v2beta1.APIGroupDiscovery, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.Versions = *(*[]v2beta1.APIVersionDiscovery)(unsafe.Pointer(&in.Versions))
return nil
}
// Convert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery is an autogenerated conversion function.
func Convert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(in *apidiscovery.APIGroupDiscovery, out *v2beta1.APIGroupDiscovery, s conversion.Scope) error {
return autoConvert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(in, out, s)
}
func autoConvert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(in *v2beta1.APIGroupDiscoveryList, out *apidiscovery.APIGroupDiscoveryList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]apidiscovery.APIGroupDiscovery)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList is an autogenerated conversion function.
func Convert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(in *v2beta1.APIGroupDiscoveryList, out *apidiscovery.APIGroupDiscoveryList, s conversion.Scope) error {
return autoConvert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(in, out, s)
}
func autoConvert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(in *apidiscovery.APIGroupDiscoveryList, out *v2beta1.APIGroupDiscoveryList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v2beta1.APIGroupDiscovery)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList is an autogenerated conversion function.
func Convert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(in *apidiscovery.APIGroupDiscoveryList, out *v2beta1.APIGroupDiscoveryList, s conversion.Scope) error {
return autoConvert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(in, out, s)
}
func autoConvert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(in *v2beta1.APIResourceDiscovery, out *apidiscovery.APIResourceDiscovery, s conversion.Scope) error {
out.Resource = in.Resource
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
out.Scope = apidiscovery.ResourceScope(in.Scope)
out.SingularResource = in.SingularResource
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames))
out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories))
out.Subresources = *(*[]apidiscovery.APISubresourceDiscovery)(unsafe.Pointer(&in.Subresources))
return nil
}
// Convert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery is an autogenerated conversion function.
func Convert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(in *v2beta1.APIResourceDiscovery, out *apidiscovery.APIResourceDiscovery, s conversion.Scope) error {
return autoConvert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(in, out, s)
}
func autoConvert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(in *apidiscovery.APIResourceDiscovery, out *v2beta1.APIResourceDiscovery, s conversion.Scope) error {
out.Resource = in.Resource
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
out.Scope = v2beta1.ResourceScope(in.Scope)
out.SingularResource = in.SingularResource
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames))
out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories))
out.Subresources = *(*[]v2beta1.APISubresourceDiscovery)(unsafe.Pointer(&in.Subresources))
return nil
}
// Convert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery is an autogenerated conversion function.
func Convert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(in *apidiscovery.APIResourceDiscovery, out *v2beta1.APIResourceDiscovery, s conversion.Scope) error {
return autoConvert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(in, out, s)
}
func autoConvert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(in *v2beta1.APISubresourceDiscovery, out *apidiscovery.APISubresourceDiscovery, s conversion.Scope) error {
out.Subresource = in.Subresource
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
out.AcceptedTypes = *(*[]v1.GroupVersionKind)(unsafe.Pointer(&in.AcceptedTypes))
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
return nil
}
// Convert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery is an autogenerated conversion function.
func Convert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(in *v2beta1.APISubresourceDiscovery, out *apidiscovery.APISubresourceDiscovery, s conversion.Scope) error {
return autoConvert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(in, out, s)
}
func autoConvert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(in *apidiscovery.APISubresourceDiscovery, out *v2beta1.APISubresourceDiscovery, s conversion.Scope) error {
out.Subresource = in.Subresource
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
out.AcceptedTypes = *(*[]v1.GroupVersionKind)(unsafe.Pointer(&in.AcceptedTypes))
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
return nil
}
// Convert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery is an autogenerated conversion function.
func Convert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(in *apidiscovery.APISubresourceDiscovery, out *v2beta1.APISubresourceDiscovery, s conversion.Scope) error {
return autoConvert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(in, out, s)
}
func autoConvert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(in *v2beta1.APIVersionDiscovery, out *apidiscovery.APIVersionDiscovery, s conversion.Scope) error {
out.Version = in.Version
out.Resources = *(*[]apidiscovery.APIResourceDiscovery)(unsafe.Pointer(&in.Resources))
out.Freshness = apidiscovery.DiscoveryFreshness(in.Freshness)
return nil
}
// Convert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery is an autogenerated conversion function.
func Convert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(in *v2beta1.APIVersionDiscovery, out *apidiscovery.APIVersionDiscovery, s conversion.Scope) error {
return autoConvert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(in, out, s)
}
func autoConvert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(in *apidiscovery.APIVersionDiscovery, out *v2beta1.APIVersionDiscovery, s conversion.Scope) error {
out.Version = in.Version
out.Resources = *(*[]v2beta1.APIResourceDiscovery)(unsafe.Pointer(&in.Resources))
out.Freshness = v2beta1.DiscoveryFreshness(in.Freshness)
return nil
}
// Convert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery is an autogenerated conversion function.
func Convert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(in *apidiscovery.APIVersionDiscovery, out *v2beta1.APIVersionDiscovery, s conversion.Scope) error {
return autoConvert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(in, out, s)
}

View File

@ -0,0 +1,33 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by defaulter-gen. DO NOT EDIT.
package v2beta1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
return nil
}

View File

@ -0,0 +1,190 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package apidiscovery
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroupDiscovery) DeepCopyInto(out *APIGroupDiscovery) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Versions != nil {
in, out := &in.Versions, &out.Versions
*out = make([]APIVersionDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscovery.
func (in *APIGroupDiscovery) DeepCopy() *APIGroupDiscovery {
if in == nil {
return nil
}
out := new(APIGroupDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIGroupDiscovery) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroupDiscoveryList) DeepCopyInto(out *APIGroupDiscoveryList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]APIGroupDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscoveryList.
func (in *APIGroupDiscoveryList) DeepCopy() *APIGroupDiscoveryList {
if in == nil {
return nil
}
out := new(APIGroupDiscoveryList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIGroupDiscoveryList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIResourceDiscovery) DeepCopyInto(out *APIResourceDiscovery) {
*out = *in
if in.ResponseKind != nil {
in, out := &in.ResponseKind, &out.ResponseKind
*out = new(v1.GroupVersionKind)
**out = **in
}
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ShortNames != nil {
in, out := &in.ShortNames, &out.ShortNames
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Categories != nil {
in, out := &in.Categories, &out.Categories
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Subresources != nil {
in, out := &in.Subresources, &out.Subresources
*out = make([]APISubresourceDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceDiscovery.
func (in *APIResourceDiscovery) DeepCopy() *APIResourceDiscovery {
if in == nil {
return nil
}
out := new(APIResourceDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APISubresourceDiscovery) DeepCopyInto(out *APISubresourceDiscovery) {
*out = *in
if in.ResponseKind != nil {
in, out := &in.ResponseKind, &out.ResponseKind
*out = new(v1.GroupVersionKind)
**out = **in
}
if in.AcceptedTypes != nil {
in, out := &in.AcceptedTypes, &out.AcceptedTypes
*out = make([]v1.GroupVersionKind, len(*in))
copy(*out, *in)
}
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APISubresourceDiscovery.
func (in *APISubresourceDiscovery) DeepCopy() *APISubresourceDiscovery {
if in == nil {
return nil
}
out := new(APISubresourceDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIVersionDiscovery) DeepCopyInto(out *APIVersionDiscovery) {
*out = *in
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]APIResourceDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersionDiscovery.
func (in *APIVersionDiscovery) DeepCopy() *APIVersionDiscovery {
if in == nil {
return nil
}
out := new(APIVersionDiscovery)
in.DeepCopyInto(out)
return out
}

View File

@ -55,6 +55,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfiguration(ref),
"k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurationList(ref),
"k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig": schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref),
"k8s.io/api/apidiscovery/v2beta1.APIGroupDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref),
"k8s.io/api/apidiscovery/v2beta1.APIGroupDiscoveryList": schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref),
"k8s.io/api/apidiscovery/v2beta1.APIResourceDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref),
"k8s.io/api/apidiscovery/v2beta1.APISubresourceDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref),
"k8s.io/api/apidiscovery/v2beta1.APIVersionDiscovery": schema_k8sio_api_apidiscovery_v2beta1_APIVersionDiscovery(ref),
"k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion": schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref),
"k8s.io/api/apiserverinternal/v1alpha1.StorageVersion": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref),
"k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref),
@ -2424,6 +2429,370 @@ func schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref comm
}
}
func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "APIGroupDiscovery holds information about which resources are being served for all version of the API Group. It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version. Versions are in descending order of preference, with the first version being the preferred entry.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Description: "Standard object's metadata. The only field completed will be name. For instance, resourceVersion will be empty. name is the name of the API group whose discovery information is presented here. name is allowed to be \"\" to represent the legacy, ungroupified resources. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
Default: map[string]interface{}{},
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
},
},
"versions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"version",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "versions are the versions supported in this group. They are sorted in descending order of preference, with the preferred version being the first entry.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/api/apidiscovery/v2beta1.APIVersionDiscovery"),
},
},
},
},
},
},
},
},
Dependencies: []string{
"k8s.io/api/apidiscovery/v2beta1.APIVersionDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
}
}
func schema_k8sio_api_apidiscovery_v2beta1_APIGroupDiscoveryList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery. This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers) that a cluster supports.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Description: "ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
Default: map[string]interface{}{},
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Description: "items is the list of groups for discovery. The groups are listed in priority order.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/api/apidiscovery/v2beta1.APIGroupDiscovery"),
},
},
},
},
},
},
Required: []string{"items"},
},
},
Dependencies: []string{
"k8s.io/api/apidiscovery/v2beta1.APIGroupDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
}
}
func schema_k8sio_api_apidiscovery_v2beta1_APIResourceDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "APIResourceDiscovery provides information about an API resource for discovery.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"resource": {
SchemaProps: spec.SchemaProps{
Description: "resource is the plural name of the resource. This is used in the URL path and is the unique identifier for this resource across all versions in the API group. Resources with non-empty groups are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource> Resources with empty groups are located at /api/v1/<APIResourceDiscovery.Resource>",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"responseKind": {
SchemaProps: spec.SchemaProps{
Description: "responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. This value will be null if an APIService reports subresources but supports no operations on the parent resource",
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"),
},
},
"scope": {
SchemaProps: spec.SchemaProps{
Description: "scope indicates the scope of a resource, either Cluster or Namespaced",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"singularResource": {
SchemaProps: spec.SchemaProps{
Description: "singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely. For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence. The command line tool kubectl, for example, allows use of the singular resource name in place of plurals. The singular form of a resource should always be an optional element - when in doubt use the canonical resource name.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"verbs": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "set",
},
},
SchemaProps: spec.SchemaProps{
Description: "verbs is a list of supported API operation types (this includes but is not limited to get, list, watch, create, update, patch, delete, deletecollection, and proxy).",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
"shortNames": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "set",
},
},
SchemaProps: spec.SchemaProps{
Description: "shortNames is a list of suggested short names of the resource.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
"categories": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "set",
},
},
SchemaProps: spec.SchemaProps{
Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all'). Clients may use this to simplify acting on multiple resource types at once.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
"subresources": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"subresource",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "subresources is a list of subresources provided by this resource. Subresources are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>/name-of-instance/<APIResourceDiscovery.subresources[i].subresource>",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/api/apidiscovery/v2beta1.APISubresourceDiscovery"),
},
},
},
},
},
},
Required: []string{"resource", "scope", "singularResource", "verbs"},
},
},
Dependencies: []string{
"k8s.io/api/apidiscovery/v2beta1.APISubresourceDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"},
}
}
func schema_k8sio_api_apidiscovery_v2beta1_APISubresourceDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "APISubresourceDiscovery provides information about an API subresource for discovery.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"subresource": {
SchemaProps: spec.SchemaProps{
Description: "subresource is the name of the subresource. This is used in the URL path and is the unique identifier for this resource across all versions.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"responseKind": {
SchemaProps: spec.SchemaProps{
Description: "responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. Some subresources do not return normal resources, these will have null return types.",
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"),
},
},
"acceptedTypes": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"group",
"version",
"kind",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "acceptedTypes describes the kinds that this endpoint accepts. Subresources may accept the standard content types or define custom negotiation schemes. The list may not be exhaustive for all operations.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"),
},
},
},
},
},
"verbs": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "set",
},
},
SchemaProps: spec.SchemaProps{
Description: "verbs is a list of supported API operation types (this includes but is not limited to get, list, watch, create, update, patch, delete, deletecollection, and proxy). Subresources may define custom verbs outside the standard Kubernetes verb set. Clients should expect the behavior of standard verbs to align with Kubernetes interaction conventions.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
},
Required: []string{"subresource", "verbs"},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"},
}
}
func schema_k8sio_api_apidiscovery_v2beta1_APIVersionDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"version": {
SchemaProps: spec.SchemaProps{
Description: "version is the name of the version within a group version.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"resources": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"resource",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "resources is a list of APIResourceDiscovery objects for the corresponding group version.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/api/apidiscovery/v2beta1.APIResourceDiscovery"),
},
},
},
},
},
"freshness": {
SchemaProps: spec.SchemaProps{
Description: "freshness marks whether a group version's discovery document is up to date. \"Current\" indicates the discovery document was recently refreshed. \"Stale\" indicates the discovery document could not be retrieved and the returned discovery document may be significantly out of date. Clients that require the latest version of the discovery information be retrieved before performing an operation should not use the aggregated document",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"version"},
},
},
Dependencies: []string{
"k8s.io/api/apidiscovery/v2beta1.APIResourceDiscovery"},
}
}
func schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{

View File

@ -0,0 +1,24 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:protobuf-gen=package
// +k8s:openapi-gen=true
// +k8s:prerelease-lifecycle-gen=true
// +groupName=apidiscovery.k8s.io
package v2beta1 // import "k8s.io/api/apidiscovery/v2beta1"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,156 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax = "proto2";
package k8s.io.api.apidiscovery.v2beta1;
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/apidiscovery/v2beta1";
// APIGroupDiscovery holds information about which resources are being served for all version of the API Group.
// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
// Versions are in descending order of preference, with the first version being the preferred entry.
message APIGroupDiscovery {
// Standard object's metadata.
// The only field completed will be name. For instance, resourceVersion will be empty.
// name is the name of the API group whose discovery information is presented here.
// name is allowed to be "" to represent the legacy, ungroupified resources.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// versions are the versions supported in this group. They are sorted in descending order of preference,
// with the preferred version being the first entry.
// +listType=map
// +listMapKey=version
repeated APIVersionDiscovery versions = 2;
}
// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
// that a cluster supports.
message APIGroupDiscoveryList {
// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// items is the list of groups for discovery. The groups are listed in priority order.
repeated APIGroupDiscovery items = 2;
}
// APIResourceDiscovery provides information about an API resource for discovery.
message APIResourceDiscovery {
// resource is the plural name of the resource. This is used in the URL path and is the unique identifier
// for this resource across all versions in the API group.
// Resources with non-empty groups are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
// Resources with empty groups are located at /api/v1/<APIResourceDiscovery.Resource>
optional string resource = 1;
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
// APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior.
// This value will be null if an APIService reports subresources but supports no operations on the parent resource
optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind responseKind = 2;
// scope indicates the scope of a resource, either Cluster or Namespaced
optional string scope = 3;
// singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely.
// For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence.
// The command line tool kubectl, for example, allows use of the singular resource name in place of plurals.
// The singular form of a resource should always be an optional element - when in doubt use the canonical resource name.
optional string singularResource = 4;
// verbs is a list of supported API operation types (this includes
// but is not limited to get, list, watch, create, update, patch,
// delete, deletecollection, and proxy).
// +listType=set
repeated string verbs = 5;
// shortNames is a list of suggested short names of the resource.
// +listType=set
repeated string shortNames = 6;
// categories is a list of the grouped resources this resource belongs to (e.g. 'all').
// Clients may use this to simplify acting on multiple resource types at once.
// +listType=set
repeated string categories = 7;
// subresources is a list of subresources provided by this resource. Subresources are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>/name-of-instance/<APIResourceDiscovery.subresources[i].subresource>
// +listType=map
// +listMapKey=subresource
repeated APISubresourceDiscovery subresources = 8;
}
// APISubresourceDiscovery provides information about an API subresource for discovery.
message APISubresourceDiscovery {
// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
// for this resource across all versions.
optional string subresource = 1;
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
// Some subresources do not return normal resources, these will have null return types.
optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind responseKind = 2;
// acceptedTypes describes the kinds that this endpoint accepts.
// Subresources may accept the standard content types or define
// custom negotiation schemes. The list may not be exhaustive for
// all operations.
// +listType=map
// +listMapKey=group
// +listMapKey=version
// +listMapKey=kind
repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind acceptedTypes = 3;
// verbs is a list of supported API operation types (this includes
// but is not limited to get, list, watch, create, update, patch,
// delete, deletecollection, and proxy). Subresources may define
// custom verbs outside the standard Kubernetes verb set. Clients
// should expect the behavior of standard verbs to align with
// Kubernetes interaction conventions.
// +listType=set
repeated string verbs = 4;
}
// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
message APIVersionDiscovery {
// version is the name of the version within a group version.
optional string version = 1;
// resources is a list of APIResourceDiscovery objects for the corresponding group version.
// +listType=map
// +listMapKey=resource
repeated APIResourceDiscovery resources = 2;
// freshness marks whether a group version's discovery document is up to date.
// "Current" indicates the discovery document was recently
// refreshed. "Stale" indicates the discovery document could not
// be retrieved and the returned discovery document may be
// significantly out of date. Clients that require the latest
// version of the discovery information be retrieved before
// performing an operation should not use the aggregated document
optional string freshness = 3;
}

View File

@ -0,0 +1,56 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName is the group name for this API.
const GroupName = "apidiscovery.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta1"}
// Kind takes an unqualified kind and returns a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
return SchemeGroupVersion.WithKind(kind).GroupKind()
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
// SchemeBuilder installs the api group to a scheme
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
// AddToScheme adds api to a scheme
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&APIGroupDiscoveryList{},
&APIGroupDiscovery{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -0,0 +1,163 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.26
// +k8s:prerelease-lifecycle-gen:deprecated=1.32
// +k8s:prerelease-lifecycle-gen:removed=1.35
// The deprecate and remove versions stated above are rough estimates and may be subject to change. We are estimating v2 types will be available in 1.28 and will support 4 versions where both v2beta1 and v2 are supported before deprecation.
// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
// that a cluster supports.
type APIGroupDiscoveryList struct {
v1.TypeMeta `json:",inline"`
// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// items is the list of groups for discovery. The groups are listed in priority order.
Items []APIGroupDiscovery `json:"items" protobuf:"bytes,2,rep,name=items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.26
// +k8s:prerelease-lifecycle-gen:deprecated=1.32
// +k8s:prerelease-lifecycle-gen:removed=1.35
// The deprecate and remove versions stated above are rough estimates and may be subject to change. We are estimating v2 types will be available in 1.28 and will support 4 versions where both v2beta1 and v2 are supported before deprecation.
// APIGroupDiscovery holds information about which resources are being served for all version of the API Group.
// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
// Versions are in descending order of preference, with the first version being the preferred entry.
type APIGroupDiscovery struct {
v1.TypeMeta `json:",inline"`
// Standard object's metadata.
// The only field completed will be name. For instance, resourceVersion will be empty.
// name is the name of the API group whose discovery information is presented here.
// name is allowed to be "" to represent the legacy, ungroupified resources.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// versions are the versions supported in this group. They are sorted in descending order of preference,
// with the preferred version being the first entry.
// +listType=map
// +listMapKey=version
Versions []APIVersionDiscovery `json:"versions,omitempty" protobuf:"bytes,2,rep,name=versions"`
}
// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
type APIVersionDiscovery struct {
// version is the name of the version within a group version.
Version string `json:"version" protobuf:"bytes,1,opt,name=version"`
// resources is a list of APIResourceDiscovery objects for the corresponding group version.
// +listType=map
// +listMapKey=resource
Resources []APIResourceDiscovery `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"`
// freshness marks whether a group version's discovery document is up to date.
// "Current" indicates the discovery document was recently
// refreshed. "Stale" indicates the discovery document could not
// be retrieved and the returned discovery document may be
// significantly out of date. Clients that require the latest
// version of the discovery information be retrieved before
// performing an operation should not use the aggregated document
Freshness DiscoveryFreshness `json:"freshness,omitempty" protobuf:"bytes,3,opt,name=freshness"`
}
// APIResourceDiscovery provides information about an API resource for discovery.
type APIResourceDiscovery struct {
// resource is the plural name of the resource. This is used in the URL path and is the unique identifier
// for this resource across all versions in the API group.
// Resources with non-empty groups are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
// Resources with empty groups are located at /api/v1/<APIResourceDiscovery.Resource>
Resource string `json:"resource" protobuf:"bytes,1,opt,name=resource"`
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
// APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior.
// This value will be null if an APIService reports subresources but supports no operations on the parent resource
ResponseKind *v1.GroupVersionKind `json:"responseKind,omitempty" protobuf:"bytes,2,opt,name=responseKind"`
// scope indicates the scope of a resource, either Cluster or Namespaced
Scope ResourceScope `json:"scope" protobuf:"bytes,3,opt,name=scope"`
// singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely.
// For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence.
// The command line tool kubectl, for example, allows use of the singular resource name in place of plurals.
// The singular form of a resource should always be an optional element - when in doubt use the canonical resource name.
SingularResource string `json:"singularResource" protobuf:"bytes,4,opt,name=singularResource"`
// verbs is a list of supported API operation types (this includes
// but is not limited to get, list, watch, create, update, patch,
// delete, deletecollection, and proxy).
// +listType=set
Verbs []string `json:"verbs" protobuf:"bytes,5,opt,name=verbs"`
// shortNames is a list of suggested short names of the resource.
// +listType=set
ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,6,rep,name=shortNames"`
// categories is a list of the grouped resources this resource belongs to (e.g. 'all').
// Clients may use this to simplify acting on multiple resource types at once.
// +listType=set
Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"`
// subresources is a list of subresources provided by this resource. Subresources are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>/name-of-instance/<APIResourceDiscovery.subresources[i].subresource>
// +listType=map
// +listMapKey=subresource
Subresources []APISubresourceDiscovery `json:"subresources,omitempty" protobuf:"bytes,8,rep,name=subresources"`
}
// ResourceScope is an enum defining the different scopes available to a resource.
type ResourceScope string
const (
ScopeCluster ResourceScope = "Cluster"
ScopeNamespace ResourceScope = "Namespaced"
)
// DiscoveryFreshness is an enum defining whether the Discovery document published by an apiservice is up to date (fresh).
type DiscoveryFreshness string
const (
DiscoveryFreshnessCurrent DiscoveryFreshness = "Current"
DiscoveryFreshnessStale DiscoveryFreshness = "Stale"
)
// APISubresourceDiscovery provides information about an API subresource for discovery.
type APISubresourceDiscovery struct {
// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
// for this resource across all versions.
Subresource string `json:"subresource" protobuf:"bytes,1,opt,name=subresource"`
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
// Some subresources do not return normal resources, these will have null return types.
ResponseKind *v1.GroupVersionKind `json:"responseKind,omitempty" protobuf:"bytes,2,opt,name=responseKind"`
// acceptedTypes describes the kinds that this endpoint accepts.
// Subresources may accept the standard content types or define
// custom negotiation schemes. The list may not be exhaustive for
// all operations.
// +listType=map
// +listMapKey=group
// +listMapKey=version
// +listMapKey=kind
AcceptedTypes []v1.GroupVersionKind `json:"acceptedTypes,omitempty" protobuf:"bytes,3,rep,name=acceptedTypes"`
// verbs is a list of supported API operation types (this includes
// but is not limited to get, list, watch, create, update, patch,
// delete, deletecollection, and proxy). Subresources may define
// custom verbs outside the standard Kubernetes verb set. Clients
// should expect the behavior of standard verbs to align with
// Kubernetes interaction conventions.
// +listType=set
Verbs []string `json:"verbs" protobuf:"bytes,4,opt,name=verbs"`
}

View File

@ -0,0 +1,190 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v2beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroupDiscovery) DeepCopyInto(out *APIGroupDiscovery) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Versions != nil {
in, out := &in.Versions, &out.Versions
*out = make([]APIVersionDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscovery.
func (in *APIGroupDiscovery) DeepCopy() *APIGroupDiscovery {
if in == nil {
return nil
}
out := new(APIGroupDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIGroupDiscovery) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroupDiscoveryList) DeepCopyInto(out *APIGroupDiscoveryList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]APIGroupDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscoveryList.
func (in *APIGroupDiscoveryList) DeepCopy() *APIGroupDiscoveryList {
if in == nil {
return nil
}
out := new(APIGroupDiscoveryList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIGroupDiscoveryList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIResourceDiscovery) DeepCopyInto(out *APIResourceDiscovery) {
*out = *in
if in.ResponseKind != nil {
in, out := &in.ResponseKind, &out.ResponseKind
*out = new(v1.GroupVersionKind)
**out = **in
}
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ShortNames != nil {
in, out := &in.ShortNames, &out.ShortNames
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Categories != nil {
in, out := &in.Categories, &out.Categories
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Subresources != nil {
in, out := &in.Subresources, &out.Subresources
*out = make([]APISubresourceDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceDiscovery.
func (in *APIResourceDiscovery) DeepCopy() *APIResourceDiscovery {
if in == nil {
return nil
}
out := new(APIResourceDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APISubresourceDiscovery) DeepCopyInto(out *APISubresourceDiscovery) {
*out = *in
if in.ResponseKind != nil {
in, out := &in.ResponseKind, &out.ResponseKind
*out = new(v1.GroupVersionKind)
**out = **in
}
if in.AcceptedTypes != nil {
in, out := &in.AcceptedTypes, &out.AcceptedTypes
*out = make([]v1.GroupVersionKind, len(*in))
copy(*out, *in)
}
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APISubresourceDiscovery.
func (in *APISubresourceDiscovery) DeepCopy() *APISubresourceDiscovery {
if in == nil {
return nil
}
out := new(APISubresourceDiscovery)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIVersionDiscovery) DeepCopyInto(out *APIVersionDiscovery) {
*out = *in
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]APIResourceDiscovery, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersionDiscovery.
func (in *APIVersionDiscovery) DeepCopy() *APIVersionDiscovery {
if in == nil {
return nil
}
out := new(APIVersionDiscovery)
in.DeepCopyInto(out)
return out
}

View File

@ -0,0 +1,58 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by prerelease-lifecycle-gen. DO NOT EDIT.
package v2beta1
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *APIGroupDiscovery) APILifecycleIntroduced() (major, minor int) {
return 1, 26
}
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (in *APIGroupDiscovery) APILifecycleDeprecated() (major, minor int) {
return 1, 32
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *APIGroupDiscovery) APILifecycleRemoved() (major, minor int) {
return 1, 35
}
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *APIGroupDiscoveryList) APILifecycleIntroduced() (major, minor int) {
return 1, 26
}
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (in *APIGroupDiscoveryList) APILifecycleDeprecated() (major, minor int) {
return 1, 32
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *APIGroupDiscoveryList) APILifecycleRemoved() (major, minor int) {
return 1, 35
}

View File

@ -24,6 +24,7 @@ import (
admissionv1beta1 "k8s.io/api/admission/v1beta1"
admissionregv1 "k8s.io/api/admissionregistration/v1"
admissionregv1beta1 "k8s.io/api/admissionregistration/v1beta1"
apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1"
apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
appsv1beta1 "k8s.io/api/apps/v1beta1"
@ -85,6 +86,7 @@ var groups = []runtime.SchemeBuilder{
admissionregv1beta1.SchemeBuilder,
admissionregv1.SchemeBuilder,
apiserverinternalv1alpha1.SchemeBuilder,
apidiscoveryv2beta1.SchemeBuilder,
appsv1beta1.SchemeBuilder,
appsv1beta2.SchemeBuilder,
appsv1.SchemeBuilder,

View File

@ -0,0 +1,93 @@
{
"kind": "APIGroupDiscovery",
"apiVersion": "apidiscovery.k8s.io/v2beta1",
"metadata": {
"name": "nameValue",
"generateName": "generateNameValue",
"namespace": "namespaceValue",
"selfLink": "selfLinkValue",
"uid": "uidValue",
"resourceVersion": "resourceVersionValue",
"generation": 7,
"creationTimestamp": "2008-01-01T01:01:01Z",
"deletionTimestamp": "2009-01-01T01:01:01Z",
"deletionGracePeriodSeconds": 10,
"labels": {
"labelsKey": "labelsValue"
},
"annotations": {
"annotationsKey": "annotationsValue"
},
"ownerReferences": [
{
"apiVersion": "apiVersionValue",
"kind": "kindValue",
"name": "nameValue",
"uid": "uidValue",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"finalizersValue"
],
"managedFields": [
{
"manager": "managerValue",
"operation": "operationValue",
"apiVersion": "apiVersionValue",
"time": "2004-01-01T01:01:01Z",
"fieldsType": "fieldsTypeValue",
"fieldsV1": {},
"subresource": "subresourceValue"
}
]
},
"versions": [
{
"version": "versionValue",
"resources": [
{
"resource": "resourceValue",
"responseKind": {
"group": "groupValue",
"version": "versionValue",
"kind": "kindValue"
},
"scope": "scopeValue",
"singularResource": "singularResourceValue",
"verbs": [
"verbsValue"
],
"shortNames": [
"shortNamesValue"
],
"categories": [
"categoriesValue"
],
"subresources": [
{
"subresource": "subresourceValue",
"responseKind": {
"group": "groupValue",
"version": "versionValue",
"kind": "kindValue"
},
"acceptedTypes": [
{
"group": "groupValue",
"version": "versionValue",
"kind": "kindValue"
}
],
"verbs": [
"verbsValue"
]
}
]
}
],
"freshness": "freshnessValue"
}
]
}

View File

@ -0,0 +1,63 @@
apiVersion: apidiscovery.k8s.io/v2beta1
kind: APIGroupDiscovery
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
versions:
- freshness: freshnessValue
resources:
- categories:
- categoriesValue
resource: resourceValue
responseKind:
group: groupValue
kind: kindValue
version: versionValue
scope: scopeValue
shortNames:
- shortNamesValue
singularResource: singularResourceValue
subresources:
- acceptedTypes:
- group: groupValue
kind: kindValue
version: versionValue
responseKind:
group: groupValue
kind: kindValue
version: versionValue
subresource: subresourceValue
verbs:
- verbsValue
verbs:
- verbsValue
version: versionValue

1
vendor/modules.txt vendored
View File

@ -1262,6 +1262,7 @@ k8s.io/api/admission/v1
k8s.io/api/admission/v1beta1
k8s.io/api/admissionregistration/v1
k8s.io/api/admissionregistration/v1beta1
k8s.io/api/apidiscovery/v2beta1
k8s.io/api/apiserverinternal/v1alpha1
k8s.io/api/apps/v1
k8s.io/api/apps/v1beta1